LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::ConstantSInt Class Reference

#include <Constants.h>

Inheritance diagram for llvm::ConstantSInt:

Inheritance graph
[legend]
Collaboration diagram for llvm::ConstantSInt:

Collaboration graph
[legend]
List of all members.

Public Member Functions

int64_t getValue () const
virtual bool isAllOnesValue () const
virtual bool isMaxValue () const
virtual bool isMinValue () const

Static Public Member Functions

static ConstantSIntget (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 >

Detailed Description

ConstantSInt - Signed Integer Values [sbyte, short, int, long]

Definition at line 171 of file Constants.h.


Constructor & Destructor Documentation

ConstantSInt::ConstantSInt const Type Ty,
int64_t  V
[protected]
 

Definition at line 229 of file Constants.cpp.

References llvm::Type::isInteger(), llvm::Type::isSigned(), and isValueValidForType().


Member Function Documentation

static bool llvm::ConstantSInt::classof const Value V  )  [inline, static]
 

Reimplemented from llvm::ConstantInt.

Definition at line 215 of file Constants.h.

References llvm::Value::getType(), llvm::Value::getValueType(), llvm::Type::isSigned(), and llvm::Value::SimpleConstantVal.

static bool llvm::ConstantSInt::classof const ConstantSInt  )  [inline, static]
 

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 214 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 750 of file Constants.cpp.

Referenced by ConvertOperandToType(), llvm::ConstantArray::get(), llvm::ConstantInt::get(), llvm::ConstantIntegral::getAllOnesValue(), llvm::SCEVUnknown::getIntegerSCEV(), llvm::ConstantIntegral::getMaxValue(), llvm::ConstantIntegral::getMinValue(), llvm::Constant::getNullValue(), llvm::getStructOffsetType(), llvm::getTriggerCode(), getUnsignedConstant(), llvm::IncrementCounterInBlock(), OperandConvertibleToType(), llvm::BytecodeReader::ParseConstantValue(), llvm::BytecodeReader::ParseStringConstants(), llvm::JIT::runFunction(), llvm::ProfilePaths::runOnFunction(), and llvm::AllocInfo::toConstant().

int64_t llvm::ConstantSInt::getValue  )  const [inline]
 

getValue - return the underlying value of this constant.

Definition at line 188 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 190 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 195 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 205 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 405 of file Constants.cpp.

References llvm::Type::getTypeID(), INT16_MIN, INT32_MIN, INT8_MIN, llvm::Type::IntTyID, llvm::Type::LongTyID, llvm::Type::SByteTyID, and llvm::Type::ShortTyID.

Referenced by ConstantSInt(), llvm::getStructOffsetType(), getUnsignedConstant(), isMaxValue(), isMinValue(), and llvm::BytecodeReader::ParseConstantValue().


Friends And Related Function Documentation

friend struct ConstantCreator< ConstantSInt, Type, int64_t > [friend]
 

Definition at line 173 of file Constants.h.


The documentation for this class was generated from the following files: