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::ConstantInt Class Reference

#include <Constants.h>

Inheritance diagram for llvm::ConstantInt:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

bool equalsInt (unsigned char V) const
virtual bool isNullValue () const
virtual bool isMaxValue () const =0
virtual bool isMinValue () const =0

Static Public Member Functions

static ConstantIntget (const Type *Ty, unsigned char V)
static bool classof (const ConstantInt *)
 Methods for support type inquiry through isa, cast, and dyn_cast:.
static bool classof (const Value *V)

Protected Member Functions

 ConstantInt (const ConstantInt &)
 ConstantInt (const Type *Ty, uint64_t V)

Detailed Description

ConstantInt - Superclass of ConstantSInt & ConstantUInt, to make dealing with integral constants easier.

Definition at line 132 of file Constants.h.


Constructor & Destructor Documentation

llvm::ConstantInt::ConstantInt const ConstantInt  )  [protected]
 

ConstantInt::ConstantInt const Type Ty,
uint64_t  V
[protected]
 

Definition at line 226 of file Constants.cpp.


Member Function Documentation

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

Reimplemented from llvm::ConstantIntegral.

Reimplemented in llvm::ConstantSInt, and llvm::ConstantUInt.

Definition at line 161 of file Constants.h.

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

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

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

Definition at line 160 of file Constants.h.

bool llvm::ConstantInt::equalsInt unsigned char  V  )  const [inline]
 

equalsInt - Provide a helper method that can be used to determine if the constant contained within is equal to a constant. This only works for very small values, because this is all that can be represented with all types.

Definition at line 142 of file Constants.h.

References llvm::ConstantIntegral::Val.

Referenced by Add(), and Mul().

ConstantInt * ConstantInt::get const Type Ty,
unsigned char  V
[static]
 

ConstantInt::get static method: return a ConstantInt with the specified value. as above, we work only with very small values here.

Definition at line 758 of file Constants.cpp.

References llvm::ConstantUInt::get(), llvm::ConstantSInt::get(), and llvm::Type::isSigned().

Referenced by GatherConstantSetNEs(), llvm::SCEVAddRecExpr::getNumIterationsInRange(), llvm::ConstantExpr::getSizeOf(), llvm::IncrementCounterInBlock(), and Next().

virtual bool llvm::ConstantInt::isMaxValue  )  const [pure virtual]
 

isMaxValue - Return true if this is the largest value that may be represented by this type.

Implements llvm::ConstantIntegral.

Implemented in llvm::ConstantSInt, and llvm::ConstantUInt.

virtual bool llvm::ConstantInt::isMinValue  )  const [pure virtual]
 

isMinValue - Return true if this is the smallest value that may be represented by this type.

Implements llvm::ConstantIntegral.

Implemented in llvm::ConstantSInt, and llvm::ConstantUInt.

virtual bool llvm::ConstantInt::isNullValue  )  const [inline, virtual]
 

isNullValue - Return true if this is the value that would be returned by getNullValue.

Implements llvm::ConstantIntegral.

Definition at line 155 of file Constants.h.

References llvm::ConstantIntegral::Val.

Referenced by llvm::ExprType::ExprType(), isSignBitCheck(), and MulWithOverflow().


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