LLVM API Documentation
#include <Constants.h>
Inheritance diagram for llvm::ConstantSInt:
Public Member Functions | |
int64_t | getValue () const |
virtual bool | isAllOnesValue () const |
virtual bool | isMaxValue () const |
virtual bool | isMinValue () const |
Static Public Member Functions | |
static ConstantSInt * | get (const Type *Ty, int64_t V) |
static bool | isValueValidForType (const Type *Ty, int64_t V) |
static bool | classof (const ConstantSInt *) |
static bool | classof (const Value *V) |
Protected Member Functions | |
ConstantSInt (const Type *Ty, int64_t V) | |
Friends | |
struct | ConstantCreator< ConstantSInt, Type, int64_t > |
Definition at line 185 of file Constants.h.
ConstantSInt::ConstantSInt | ( | const Type * | Ty, | |
int64_t | V | |||
) | [protected] |
Definition at line 225 of file Constants.cpp.
References llvm::Type::isInteger(), llvm::Type::isSigned(), and isValueValidForType().
static bool llvm::ConstantSInt::classof | ( | const Value * | V | ) | [inline, static] |
Reimplemented from llvm::ConstantInt.
Definition at line 229 of file Constants.h.
References llvm::Value::ConstantSIntVal, and V.
static bool llvm::ConstantSInt::classof | ( | const ConstantSInt * | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition at line 228 of file Constants.h.
ConstantSInt * ConstantSInt::get | ( | const Type * | Ty, | |
int64_t | V | |||
) | [static] |
get() - Static factory methods - Return objects of the specified value
Definition at line 783 of file Constants.cpp.
References SIntConstants.
Referenced by DISerializeVisitor::Apply(), llvm::ConstantArray::get(), llvm::ConstantInt::get(), llvm::ConstantIntegral::getAllOnesValue(), llvm::SCEVUnknown::getIntegerSCEV(), llvm::ConstantIntegral::getMaxValue(), llvm::ConstantIntegral::getMinValue(), llvm::Constant::getNullValue(), llvm::getStructOffsetType(), llvm::RSProfilers_std::IncrementCounterInBlock(), llvm::IncrementCounterInBlock(), llvm::BytecodeReader::ParseConstantPoolValue(), llvm::BytecodeReader::ParseStringConstants(), llvm::JIT::runFunction(), and llvm::AllocInfo::toConstant().
int64_t llvm::ConstantSInt::getValue | ( | ) | const [inline] |
getValue - return the underlying value of this constant.
Definition at line 202 of file Constants.h.
References llvm::ConstantIntegral::Val.
Referenced by isAllOnesValue(), isMaxValue(), isMaxValueMinusOne(), isMinValue(), and isMinValuePlusOne().
virtual bool llvm::ConstantSInt::isAllOnesValue | ( | ) | const [inline, virtual] |
isAllOnesValue - Return true if every bit in this constant is set to true.
Implements llvm::ConstantIntegral.
Definition at line 204 of file Constants.h.
References getValue().
virtual bool llvm::ConstantSInt::isMaxValue | ( | ) | const [inline, virtual] |
isMaxValue - Return true if this is the largest value that may be represented by this type.
Implements llvm::ConstantInt.
Definition at line 209 of file Constants.h.
References llvm::Value::getType(), getValue(), isValueValidForType(), and V.
virtual bool llvm::ConstantSInt::isMinValue | ( | ) | const [inline, virtual] |
isMinValue - Return true if this is the smallest value that may be represented by this type.
Implements llvm::ConstantInt.
Definition at line 219 of file Constants.h.
References llvm::Value::getType(), getValue(), isValueValidForType(), and V.
bool ConstantSInt::isValueValidForType | ( | const Type * | Ty, | |
int64_t | V | |||
) | [static] |
isValueValidForType - return true if Ty is big enough to represent V.
Definition at line 489 of file Constants.cpp.
References llvm::Type::getTypeID(), INT16_MIN, INT32_MAX, INT32_MIN, INT8_MIN, llvm::Type::IntTyID, llvm::Type::LongTyID, llvm::Type::SByteTyID, and llvm::Type::ShortTyID.
Referenced by ConstantSInt(), llvm::getStructOffsetType(), isMaxValue(), isMinValue(), and llvm::BytecodeReader::ParseConstantPoolValue().
friend struct ConstantCreator< ConstantSInt, Type, int64_t > [friend] |
Definition at line 187 of file Constants.h.