LLVM API Documentation

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 185 of file Constants.h.


Constructor & Destructor Documentation

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

Definition at line 226 of file Constants.cpp.

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


Member Function Documentation

ConstantSInt * ConstantSInt::get ( const Type Ty,
int64_t  V 
) [static]

get() - Static factory methods - Return objects of the specified value

Definition at line 885 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(), and llvm::JIT::runFunction().

bool ConstantSInt::isValueValidForType ( const Type Ty,
int64_t  V 
) [static]

isValueValidForType - return true if Ty is big enough to represent V.

Definition at line 590 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().

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.

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.

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.


Friends And Related Function Documentation

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

Definition at line 187 of file Constants.h.


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