LLVM API Documentation

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, ValueTy VT, uint64_t V)

Detailed Description

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

Definition at line 146 of file Constants.h.


Constructor & Destructor Documentation

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

ConstantInt::ConstantInt ( const Type Ty,
ValueTy  VT,
uint64_t  V 
) [protected]

Definition at line 222 of file Constants.cpp.


Member Function Documentation

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

References llvm::ConstantIntegral::Val.

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 893 of file Constants.cpp.

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

Referenced by llvm::SCEVAddRecExpr::getNumIterationsInRange(), llvm::ConstantExpr::getSizeOf(), llvm::RSProfilers_std::IncrementCounterInBlock(), llvm::IncrementCounterInBlock(), LowerBSWAP(), LowerCTLZ(), LowerCTPOP(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), and llvm::SCEVExpander::visitAddRecExpr().

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

References llvm::ConstantIntegral::Val.

Referenced by isSignBitCheck(), and MulWithOverflow().

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.

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

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

Definition at line 174 of file Constants.h.

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

Reimplemented from llvm::ConstantIntegral.

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

Definition at line 175 of file Constants.h.

References llvm::Value::ConstantSIntVal, llvm::Value::ConstantUIntVal, and V.


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