LLVM  4.0.0
Public Member Functions | Static Public Member Functions | List of all members
llvm::APSInt Class Reference

#include <APSInt.h>

Inheritance diagram for llvm::APSInt:
[legend]
Collaboration diagram for llvm::APSInt:
[legend]

Public Member Functions

 APSInt ()
 Default constructor that creates an uninitialized APInt. More...
 
 APSInt (uint32_t BitWidth, bool isUnsigned=true)
 APSInt ctor - Create an APSInt with the specified width, default to unsigned. More...
 
 APSInt (APInt I, bool isUnsigned=true)
 
 APSInt (StringRef Str)
 Construct an APSInt from a string representation. More...
 
APSIntoperator= (APInt RHS)
 
APSIntoperator= (uint64_t RHS)
 
bool isSigned () const
 
bool isUnsigned () const
 
void setIsUnsigned (bool Val)
 
void setIsSigned (bool Val)
 
void toString (SmallVectorImpl< char > &Str, unsigned Radix=10) const
 toString - Append this APSInt to the specified SmallString. More...
 
std::string toString (unsigned Radix) const
 toString - Converts an APInt to a std::string. More...
 
int64_t getExtValue () const
 Get the correctly-extended int64_t value. More...
 
APSInt trunc (uint32_t width) const
 
APSInt extend (uint32_t width) const
 
APSInt extOrTrunc (uint32_t width) const
 
const APSIntoperator%= (const APSInt &RHS)
 
const APSIntoperator/= (const APSInt &RHS)
 
APSInt operator% (const APSInt &RHS) const
 
APSInt operator/ (const APSInt &RHS) const
 
APSInt operator>> (unsigned Amt) const
 
APSIntoperator>>= (unsigned Amt)
 
bool operator< (const APSInt &RHS) const
 
bool operator> (const APSInt &RHS) const
 
bool operator<= (const APSInt &RHS) const
 
bool operator>= (const APSInt &RHS) const
 
bool operator== (const APSInt &RHS) const
 
bool operator!= (const APSInt &RHS) const
 
bool operator== (int64_t RHS) const
 
bool operator!= (int64_t RHS) const
 
bool operator<= (int64_t RHS) const
 
bool operator>= (int64_t RHS) const
 
bool operator< (int64_t RHS) const
 
bool operator> (int64_t RHS) const
 
APSInt operator<< (unsigned Bits) const
 
APSIntoperator<<= (unsigned Amt)
 
APSIntoperator++ ()
 
APSIntoperator-- ()
 
APSInt operator++ (int)
 
APSInt operator-- (int)
 
APSInt operator- () const
 
APSIntoperator+= (const APSInt &RHS)
 
APSIntoperator-= (const APSInt &RHS)
 
APSIntoperator*= (const APSInt &RHS)
 
APSIntoperator&= (const APSInt &RHS)
 
APSIntoperator|= (const APSInt &RHS)
 
APSIntoperator^= (const APSInt &RHS)
 
APSInt operator& (const APSInt &RHS) const
 
APSInt And (const APSInt &RHS) const
 
APSInt operator| (const APSInt &RHS) const
 
APSInt Or (const APSInt &RHS) const
 
APSInt operator^ (const APSInt &RHS) const
 
APSInt Xor (const APSInt &RHS) const
 
APSInt operator* (const APSInt &RHS) const
 
APSInt operator+ (const APSInt &RHS) const
 
APSInt operator- (const APSInt &RHS) const
 
APSInt operator~ () const
 
void Profile (FoldingSetNodeID &ID) const
 Profile - Used to insert APSInt objects, or objects that contain APSInt objects, into FoldingSets. More...
 
- Public Member Functions inherited from llvm::APInt
 APInt (unsigned numBits, uint64_t val, bool isSigned=false)
 Create a new APInt of numBits width, initialized as val. More...
 
 APInt (unsigned numBits, ArrayRef< uint64_t > bigVal)
 Construct an APInt of numBits width, initialized as bigVal[]. More...
 
 APInt (unsigned numBits, unsigned numWords, const uint64_t bigVal[])
 Equivalent to APInt(numBits, ArrayRef<uint64_t>(bigVal, numWords)), but deprecated because this constructor is prone to ambiguity with the APInt(unsigned, uint64_t, bool) constructor. More...
 
 APInt (unsigned numBits, StringRef str, uint8_t radix)
 Construct an APInt from a string representation. More...
 
 APInt (const APInt &that)
 Simply makes *this a copy of that. More...
 
 APInt (APInt &&that)
 Move Constructor. More...
 
 ~APInt ()
 Destructor. More...
 
 APInt ()
 Default constructor that creates an uninteresting APInt representing a 1-bit zero value. More...
 
bool needsCleanup () const
 Returns whether this instance allocated memory. More...
 
void Profile (FoldingSetNodeID &id) const
 Used to insert APInt objects, or objects that contain APInt objects, into FoldingSets. More...
 
bool isNegative () const
 Determine sign of this APInt. More...
 
bool isNonNegative () const
 Determine if this APInt Value is non-negative (>= 0) More...
 
bool isStrictlyPositive () const
 Determine if this APInt Value is positive. More...
 
bool isAllOnesValue () const
 Determine if all bits are set. More...
 
bool isMaxValue () const
 Determine if this is the largest unsigned value. More...
 
bool isMaxSignedValue () const
 Determine if this is the largest signed value. More...
 
bool isMinValue () const
 Determine if this is the smallest unsigned value. More...
 
bool isMinSignedValue () const
 Determine if this is the smallest signed value. More...
 
bool isIntN (unsigned N) const
 Check if this APInt has an N-bits unsigned integer value. More...
 
bool isSignedIntN (unsigned N) const
 Check if this APInt has an N-bits signed integer value. More...
 
bool isPowerOf2 () const
 Check if this APInt's value is a power of two greater than zero. More...
 
bool isSignBit () const
 Check if the APInt's value is returned by getSignBit. More...
 
bool getBoolValue () const
 Convert APInt to a boolean value. More...
 
uint64_t getLimitedValue (uint64_t Limit=~0ULL) const
 If this value is smaller than the specified limit, return it, otherwise return the limit value. More...
 
bool isSplat (unsigned SplatSizeInBits) const
 Check if the APInt consists of a repeated bit pattern. More...
 
const APInt operator++ (int)
 Postfix increment operator. More...
 
APIntoperator++ ()
 Prefix increment operator. More...
 
const APInt operator-- (int)
 Postfix decrement operator. More...
 
APIntoperator-- ()
 Prefix decrement operator. More...
 
APInt operator~ () const
 Unary bitwise complement operator. More...
 
bool operator! () const
 Logical negation operator. More...
 
APIntoperator= (const APInt &RHS)
 Copy assignment operator. More...
 
APIntoperator= (APInt &&that)
 Move assignment operator. More...
 
APIntoperator= (uint64_t RHS)
 Assignment operator. More...
 
APIntoperator&= (const APInt &RHS)
 Bitwise AND assignment operator. More...
 
APIntoperator|= (const APInt &RHS)
 Bitwise OR assignment operator. More...
 
APIntoperator|= (uint64_t RHS)
 Bitwise OR assignment operator. More...
 
APIntoperator^= (const APInt &RHS)
 Bitwise XOR assignment operator. More...
 
APIntoperator*= (const APInt &RHS)
 Multiplication assignment operator. More...
 
APIntoperator+= (const APInt &RHS)
 Addition assignment operator. More...
 
APIntoperator+= (uint64_t RHS)
 
APIntoperator-= (const APInt &RHS)
 Subtraction assignment operator. More...
 
APIntoperator-= (uint64_t RHS)
 
APIntoperator<<= (unsigned shiftAmt)
 Left-shift assignment function. More...
 
bool operator== (const APInt &RHS) const
 Equality operator. More...
 
bool operator== (uint64_t Val) const
 Equality operator. More...
 
bool eq (const APInt &RHS) const
 Equality comparison. More...
 
bool operator!= (const APInt &RHS) const
 Inequality operator. More...
 
bool operator!= (uint64_t Val) const
 Inequality operator. More...
 
bool ne (const APInt &RHS) const
 Inequality comparison. More...
 
bool ult (const APInt &RHS) const
 Unsigned less than comparison. More...
 
bool ult (uint64_t RHS) const
 Unsigned less than comparison. More...
 
bool slt (const APInt &RHS) const
 Signed less than comparison. More...
 
bool slt (int64_t RHS) const
 Signed less than comparison. More...
 
bool ule (const APInt &RHS) const
 Unsigned less or equal comparison. More...
 
bool ule (uint64_t RHS) const
 Unsigned less or equal comparison. More...
 
bool sle (const APInt &RHS) const
 Signed less or equal comparison. More...
 
bool sle (uint64_t RHS) const
 Signed less or equal comparison. More...
 
bool ugt (const APInt &RHS) const
 Unsigned greather than comparison. More...
 
bool ugt (uint64_t RHS) const
 Unsigned greater than comparison. More...
 
bool sgt (const APInt &RHS) const
 Signed greather than comparison. More...
 
bool sgt (int64_t RHS) const
 Signed greater than comparison. More...
 
bool uge (const APInt &RHS) const
 Unsigned greater or equal comparison. More...
 
bool uge (uint64_t RHS) const
 Unsigned greater or equal comparison. More...
 
bool sge (const APInt &RHS) const
 Signed greather or equal comparison. More...
 
bool sge (int64_t RHS) const
 Signed greater or equal comparison. More...
 
bool intersects (const APInt &RHS) const
 This operation tests if there are any pairs of corresponding bits between this APInt and RHS that are both set. More...
 
APInt trunc (unsigned width) const
 Truncate to new width. More...
 
APInt sext (unsigned width) const
 Sign extend to a new width. More...
 
APInt zext (unsigned width) const
 Zero extend to a new width. More...
 
APInt sextOrTrunc (unsigned width) const
 Sign extend or truncate to width. More...
 
APInt zextOrTrunc (unsigned width) const
 Zero extend or truncate to width. More...
 
APInt sextOrSelf (unsigned width) const
 Sign extend or truncate to width. More...
 
APInt zextOrSelf (unsigned width) const
 Zero extend or truncate to width. More...
 
void setAllBits ()
 Set every bit to 1. More...
 
void setBit (unsigned bitPosition)
 Set a given bit to 1. More...
 
void clearAllBits ()
 Set every bit to 0. More...
 
void clearBit (unsigned bitPosition)
 Set a given bit to 0. More...
 
void flipAllBits ()
 Toggle every bit to its opposite value. More...
 
void flipBit (unsigned bitPosition)
 Toggles a given bit to its opposite value. More...
 
unsigned logBase2 () const
 
unsigned ceilLogBase2 () const
 
unsigned nearestLogBase2 () const
 
int32_t exactLogBase2 () const
 
APInt sqrt () const
 Compute the square root. More...
 
APInt abs () const
 Get the absolute value;. More...
 
APInt multiplicativeInverse (const APInt &modulo) const
 Computes the multiplicative inverse of this APInt for a given modulo. More...
 
ms magic () const
 Calculate the magic numbers required to implement a signed integer division by a constant as a sequence of multiplies, adds and shifts. More...
 
mu magicu (unsigned LeadingZeros=0) const
 Calculate the magic numbers required to implement an unsigned integer division by a constant as a sequence of multiplies, adds and shifts. More...
 
APInt getHiBits (unsigned numBits) const
 Compute an APInt containing numBits highbits from this APInt. More...
 
APInt getLoBits (unsigned numBits) const
 Compute an APInt containing numBits lowbits from this APInt. More...
 
const uint64_t * getRawData () const
 This function returns a pointer to the internal storage of the APInt. More...
 
APInt operator& (const APInt &RHS) const
 Bitwise AND operator. More...
 
APInt And (const APInt &RHS) const
 
APInt operator| (const APInt &RHS) const
 Bitwise OR operator. More...
 
APInt Or (const APInt &RHS) const
 Bitwise OR function. More...
 
APInt operator^ (const APInt &RHS) const
 Bitwise XOR operator. More...
 
APInt Xor (const APInt &RHS) const
 Bitwise XOR function. More...
 
APInt operator* (const APInt &RHS) const
 Multiplication operator. More...
 
APInt operator<< (unsigned Bits) const
 Left logical shift operator. More...
 
APInt operator<< (const APInt &Bits) const
 Left logical shift operator. More...
 
APInt ashr (unsigned shiftAmt) const
 Arithmetic right-shift function. More...
 
APInt lshr (unsigned shiftAmt) const
 Logical right-shift function. More...
 
APInt shl (unsigned shiftAmt) const
 Left-shift function. More...
 
APInt rotl (unsigned rotateAmt) const
 Rotate left by rotateAmt. More...
 
APInt rotr (unsigned rotateAmt) const
 Rotate right by rotateAmt. More...
 
APInt ashr (const APInt &shiftAmt) const
 Arithmetic right-shift function. More...
 
APInt lshr (const APInt &shiftAmt) const
 Logical right-shift function. More...
 
APInt shl (const APInt &shiftAmt) const
 Left-shift function. More...
 
APInt rotl (const APInt &rotateAmt) const
 Rotate left by rotateAmt. More...
 
APInt rotr (const APInt &rotateAmt) const
 Rotate right by rotateAmt. More...
 
APInt udiv (const APInt &RHS) const
 Unsigned division operation. More...
 
APInt sdiv (const APInt &RHS) const
 Signed division function for APInt. More...
 
APInt urem (const APInt &RHS) const
 Unsigned remainder operation. More...
 
APInt srem (const APInt &RHS) const
 Function for signed remainder operation. More...
 
APInt sadd_ov (const APInt &RHS, bool &Overflow) const
 
APInt uadd_ov (const APInt &RHS, bool &Overflow) const
 
APInt ssub_ov (const APInt &RHS, bool &Overflow) const
 
APInt usub_ov (const APInt &RHS, bool &Overflow) const
 
APInt sdiv_ov (const APInt &RHS, bool &Overflow) const
 
APInt smul_ov (const APInt &RHS, bool &Overflow) const
 
APInt umul_ov (const APInt &RHS, bool &Overflow) const
 
APInt sshl_ov (const APInt &Amt, bool &Overflow) const
 
APInt ushl_ov (const APInt &Amt, bool &Overflow) const
 
bool operator[] (unsigned bitPosition) const
 Array-indexing support. More...
 
unsigned getBitWidth () const
 Return the number of bits in the APInt. More...
 
unsigned getNumWords () const
 Get the number of words. More...
 
unsigned getActiveBits () const
 Compute the number of active bits in the value. More...
 
unsigned getActiveWords () const
 Compute the number of active words in the value of this APInt. More...
 
unsigned getMinSignedBits () const
 Get the minimum bit size for this signed APInt. More...
 
uint64_t getZExtValue () const
 Get zero extended value. More...
 
int64_t getSExtValue () const
 Get sign extended value. More...
 
unsigned countLeadingZeros () const
 The APInt version of the countLeadingZeros functions in MathExtras.h. More...
 
unsigned countLeadingOnes () const
 Count the number of leading one bits. More...
 
unsigned getNumSignBits () const
 Computes the number of leading bits of this APInt that are equal to its sign bit. More...
 
unsigned countTrailingZeros () const
 Count the number of trailing zero bits. More...
 
unsigned countTrailingOnes () const
 Count the number of trailing one bits. More...
 
unsigned countPopulation () const
 Count the number of bits set. More...
 
void print (raw_ostream &OS, bool isSigned) const
 
void toString (SmallVectorImpl< char > &Str, unsigned Radix, bool Signed, bool formatAsCLiteral=false) const
 Converts an APInt to a string and append it to Str. More...
 
void toStringUnsigned (SmallVectorImpl< char > &Str, unsigned Radix=10) const
 Considers the APInt to be unsigned and converts it into a string in the radix given. More...
 
void toStringSigned (SmallVectorImpl< char > &Str, unsigned Radix=10) const
 Considers the APInt to be signed and converts it into a string in the radix given. More...
 
std::string toString (unsigned Radix, bool Signed) const
 Return the APInt as a std::string. More...
 
APInt byteSwap () const
 
APInt reverseBits () const
 
double roundToDouble (bool isSigned) const
 Converts this APInt to a double value. More...
 
double roundToDouble () const
 Converts this unsigned APInt to a double value. More...
 
double signedRoundToDouble () const
 Converts this signed APInt to a double value. More...
 
double bitsToDouble () const
 Converts APInt bits to a double. More...
 
float bitsToFloat () const
 Converts APInt bits to a double. More...
 
void dump () const
 debug method More...
 

Static Public Member Functions

static APSInt getMaxValue (uint32_t numBits, bool Unsigned)
 getMaxValue - Return the APSInt representing the maximum integer value with the given bit width and signedness. More...
 
static APSInt getMinValue (uint32_t numBits, bool Unsigned)
 getMinValue - Return the APSInt representing the minimum integer value with the given bit width and signedness. More...
 
static bool isSameValue (const APSInt &I1, const APSInt &I2)
 Determine if two APSInts have the same value, zero- or sign-extending as needed. More...
 
static int compareValues (const APSInt &I1, const APSInt &I2)
 Compare underlying values of two numbers. More...
 
static APSInt get (int64_t X)
 
static APSInt getUnsigned (uint64_t X)
 
- Static Public Member Functions inherited from llvm::APInt
static APInt getMaxValue (unsigned numBits)
 Gets maximum unsigned value of APInt for specific bit width. More...
 
static APInt getSignedMaxValue (unsigned numBits)
 Gets maximum signed value of APInt for a specific bit width. More...
 
static APInt getMinValue (unsigned numBits)
 Gets minimum unsigned value of APInt for a specific bit width. More...
 
static APInt getSignedMinValue (unsigned numBits)
 Gets minimum signed value of APInt for a specific bit width. More...
 
static APInt getSignBit (unsigned BitWidth)
 Get the SignBit for a specific bit width. More...
 
static APInt getAllOnesValue (unsigned numBits)
 Get the all-ones value. More...
 
static APInt getNullValue (unsigned numBits)
 Get the '0' value. More...
 
static APInt getOneBitSet (unsigned numBits, unsigned BitNo)
 Return an APInt with exactly one bit set in the result. More...
 
static APInt getBitsSet (unsigned numBits, unsigned loBit, unsigned hiBit)
 Get a value with a block of bits set. More...
 
static APInt getHighBitsSet (unsigned numBits, unsigned hiBitsSet)
 Get a value with high bits set. More...
 
static APInt getLowBitsSet (unsigned numBits, unsigned loBitsSet)
 Get a value with low bits set. More...
 
static APInt getSplat (unsigned NewLen, const APInt &V)
 Return a value containing V broadcasted over NewLen bits. More...
 
static bool isSameValue (const APInt &I1, const APInt &I2)
 Determine if two APInts have the same value, after zero-extending one of them (if needed!) to ensure that the bit-widths match. More...
 
static void udivrem (const APInt &LHS, const APInt &RHS, APInt &Quotient, APInt &Remainder)
 Dual division/remainder interface. More...
 
static void sdivrem (const APInt &LHS, const APInt &RHS, APInt &Quotient, APInt &Remainder)
 
static unsigned getNumWords (unsigned BitWidth)
 Get the number of words. More...
 
static unsigned getBitsNeeded (StringRef str, uint8_t radix)
 Get bits required for string value. More...
 
static APInt doubleToBits (double V)
 Converts a double to APInt bits. More...
 
static APInt floatToBits (float V)
 Converts a float to APInt bits. More...
 
static void tcSet (integerPart *, integerPart, unsigned int)
 Sets the least significant part of a bignum to the input value, and zeroes out higher parts. More...
 
static void tcAssign (integerPart *, const integerPart *, unsigned int)
 Assign one bignum to another. More...
 
static bool tcIsZero (const integerPart *, unsigned int)
 Returns true if a bignum is zero, false otherwise. More...
 
static int tcExtractBit (const integerPart *, unsigned int bit)
 Extract the given bit of a bignum; returns 0 or 1. Zero-based. More...
 
static void tcExtract (integerPart *, unsigned int dstCount, const integerPart *, unsigned int srcBits, unsigned int srcLSB)
 Copy the bit vector of width srcBITS from SRC, starting at bit srcLSB, to DST, of dstCOUNT parts, such that the bit srcLSB becomes the least significant bit of DST. More...
 
static void tcSetBit (integerPart *, unsigned int bit)
 Set the given bit of a bignum. Zero-based. More...
 
static void tcClearBit (integerPart *, unsigned int bit)
 Clear the given bit of a bignum. Zero-based. More...
 
static unsigned int tcLSB (const integerPart *, unsigned int)
 Returns the bit number of the least or most significant set bit of a number. More...
 
static unsigned int tcMSB (const integerPart *parts, unsigned int n)
 
static void tcNegate (integerPart *, unsigned int)
 Negate a bignum in-place. More...
 
static integerPart tcAdd (integerPart *, const integerPart *, integerPart carry, unsigned)
 DST += RHS + CARRY where CARRY is zero or one. Returns the carry flag. More...
 
static integerPart tcSubtract (integerPart *, const integerPart *, integerPart carry, unsigned)
 DST -= RHS + CARRY where CARRY is zero or one. Returns the carry flag. More...
 
static int tcMultiplyPart (integerPart *dst, const integerPart *src, integerPart multiplier, integerPart carry, unsigned int srcParts, unsigned int dstParts, bool add)
 DST += SRC * MULTIPLIER + PART if add is true DST = SRC * MULTIPLIER + PART if add is false. More...
 
static int tcMultiply (integerPart *, const integerPart *, const integerPart *, unsigned)
 DST = LHS * RHS, where DST has the same width as the operands and is filled with the least significant parts of the result. More...
 
static unsigned int tcFullMultiply (integerPart *, const integerPart *, const integerPart *, unsigned, unsigned)
 DST = LHS * RHS, where DST has width the sum of the widths of the operands. More...
 
static int tcDivide (integerPart *lhs, const integerPart *rhs, integerPart *remainder, integerPart *scratch, unsigned int parts)
 If RHS is zero LHS and REMAINDER are left unchanged, return one. More...
 
static void tcShiftLeft (integerPart *, unsigned int parts, unsigned int count)
 Shift a bignum left COUNT bits. More...
 
static void tcShiftRight (integerPart *, unsigned int parts, unsigned int count)
 Shift a bignum right COUNT bits. More...
 
static void tcAnd (integerPart *, const integerPart *, unsigned int)
 The obvious AND, OR and XOR and complement operations. More...
 
static void tcOr (integerPart *, const integerPart *, unsigned int)
 
static void tcXor (integerPart *, const integerPart *, unsigned int)
 
static void tcComplement (integerPart *, unsigned int)
 
static int tcCompare (const integerPart *, const integerPart *, unsigned int)
 Comparison (unsigned) of two bignums. More...
 
static integerPart tcIncrement (integerPart *, unsigned int)
 Increment a bignum in-place. Return the carry flag. More...
 
static integerPart tcDecrement (integerPart *, unsigned int)
 Decrement a bignum in-place. Return the borrow flag. More...
 
static void tcSetLeastSignificantBits (integerPart *, unsigned int, unsigned int bits)
 Set the least significant BITS and clear the rest. More...
 

Detailed Description

Definition at line 22 of file APSInt.h.

Constructor & Destructor Documentation

llvm::APSInt::APSInt ( )
inlineexplicit

Default constructor that creates an uninitialized APInt.

Definition at line 27 of file APSInt.h.

Referenced by APSInt().

llvm::APSInt::APSInt ( uint32_t  BitWidth,
bool  isUnsigned = true 
)
inlineexplicit

APSInt ctor - Create an APSInt with the specified width, default to unsigned.

Definition at line 31 of file APSInt.h.

llvm::APSInt::APSInt ( APInt  I,
bool  isUnsigned = true 
)
inlineexplicit

Definition at line 34 of file APSInt.h.

APSInt::APSInt ( StringRef  Str)
explicit

Construct an APSInt from a string representation.

This constructor interprets the string Str using the radix of 10. The interpretation stops at the end of the string. The bit width of the constructed APSInt is determined automatically.

Parameters
Strthe string to be interpreted.

Definition at line 21 of file APSInt.cpp.

References APSInt(), assert(), llvm::StringRef::empty(), llvm::APInt::getActiveBits(), llvm::APInt::getMinSignedBits(), llvm::StringRef::size(), and llvm::APInt::trunc().

Member Function Documentation

APSInt llvm::APSInt::And ( const APSInt RHS) const
inline

Definition at line 238 of file APSInt.h.

References llvm::operator&().

static int llvm::APSInt::compareValues ( const APSInt I1,
const APSInt I2 
)
inlinestatic

Compare underlying values of two numbers.

Definition at line 289 of file APSInt.h.

References assert(), llvm::APInt::eq(), extend(), llvm::APInt::getBitWidth(), llvm::APInt::isNegative(), isSigned(), and llvm::APInt::ugt().

APSInt llvm::APSInt::extend ( uint32_t  width) const
inline

Definition at line 85 of file APSInt.h.

References llvm::lltok::APSInt.

Referenced by compareValues().

APSInt llvm::APSInt::extOrTrunc ( uint32_t  width) const
inline

Definition at line 92 of file APSInt.h.

References llvm::lltok::APSInt.

static APSInt llvm::APSInt::get ( int64_t  X)
inlinestatic

Definition at line 314 of file APSInt.h.

References llvm::lltok::APSInt, and X.

int64_t llvm::APSInt::getExtValue ( ) const
inline

Get the correctly-extended int64_t value.

Definition at line 76 of file APSInt.h.

References assert().

Referenced by llvm::codeview::CodeViewRecordIO::mapEncodedInteger().

static APSInt llvm::APSInt::getMaxValue ( uint32_t  numBits,
bool  Unsigned 
)
inlinestatic

getMaxValue - Return the APSInt representing the maximum integer value with the given bit width and signedness.

Definition at line 270 of file APSInt.h.

References llvm::lltok::APSInt, llvm::APInt::getMaxValue(), and llvm::APInt::getSignedMaxValue().

static APSInt llvm::APSInt::getMinValue ( uint32_t  numBits,
bool  Unsigned 
)
inlinestatic

getMinValue - Return the APSInt representing the minimum integer value with the given bit width and signedness.

Definition at line 277 of file APSInt.h.

References llvm::lltok::APSInt, llvm::APInt::getMinValue(), and llvm::APInt::getSignedMinValue().

static APSInt llvm::APSInt::getUnsigned ( uint64_t  X)
inlinestatic

Definition at line 315 of file APSInt.h.

References llvm::lltok::APSInt.

static bool llvm::APSInt::isSameValue ( const APSInt I1,
const APSInt I2 
)
inlinestatic

Determine if two APSInts have the same value, zero- or sign-extending as needed.

Definition at line 284 of file APSInt.h.

bool llvm::APSInt::isSigned ( ) const
inline
bool llvm::APSInt::isUnsigned ( ) const
inline

Definition at line 60 of file APSInt.h.

bool llvm::APSInt::operator!= ( const APSInt RHS) const
inline

Definition at line 152 of file APSInt.h.

bool llvm::APSInt::operator!= ( int64_t  RHS) const
inline

Definition at line 159 of file APSInt.h.

APSInt llvm::APSInt::operator% ( const APSInt RHS) const
inline
const APSInt& llvm::APSInt::operator%= ( const APSInt RHS)
inline

Definition at line 99 of file APSInt.h.

References assert(), llvm::APIntOps::srem(), and llvm::APIntOps::urem().

APSInt llvm::APSInt::operator& ( const APSInt RHS) const
inline

Definition at line 234 of file APSInt.h.

References llvm::lltok::APSInt, and assert().

APSInt& llvm::APSInt::operator&= ( const APSInt RHS)
inline

Definition at line 218 of file APSInt.h.

References assert().

APSInt llvm::APSInt::operator* ( const APSInt RHS) const
inline

Definition at line 252 of file APSInt.h.

References llvm::lltok::APSInt, and assert().

APSInt& llvm::APSInt::operator*= ( const APSInt RHS)
inline

Definition at line 213 of file APSInt.h.

References assert().

APSInt llvm::APSInt::operator+ ( const APSInt RHS) const
inline

Definition at line 256 of file APSInt.h.

References llvm::lltok::APSInt, and assert().

APSInt& llvm::APSInt::operator++ ( )
inline

Definition at line 186 of file APSInt.h.

APSInt llvm::APSInt::operator++ ( int  )
inline

Definition at line 194 of file APSInt.h.

References llvm::lltok::APSInt.

APSInt& llvm::APSInt::operator+= ( const APSInt RHS)
inline

Definition at line 203 of file APSInt.h.

References assert().

APSInt llvm::APSInt::operator- ( ) const
inline

Definition at line 200 of file APSInt.h.

References llvm::lltok::APSInt.

APSInt llvm::APSInt::operator- ( const APSInt RHS) const
inline

Definition at line 260 of file APSInt.h.

References llvm::lltok::APSInt, and assert().

APSInt& llvm::APSInt::operator-- ( )
inline

Definition at line 190 of file APSInt.h.

APSInt llvm::APSInt::operator-- ( int  )
inline

Definition at line 197 of file APSInt.h.

References llvm::lltok::APSInt.

APSInt& llvm::APSInt::operator-= ( const APSInt RHS)
inline

Definition at line 208 of file APSInt.h.

References assert().

APSInt llvm::APSInt::operator/ ( const APSInt RHS) const
inline
const APSInt& llvm::APSInt::operator/= ( const APSInt RHS)
inline

Definition at line 107 of file APSInt.h.

References assert(), llvm::APIntOps::sdiv(), and llvm::APIntOps::udiv().

bool llvm::APSInt::operator< ( const APSInt RHS) const
inline

Definition at line 132 of file APSInt.h.

References assert().

bool llvm::APSInt::operator< ( int64_t  RHS) const
inline

Definition at line 168 of file APSInt.h.

APSInt llvm::APSInt::operator<< ( unsigned  Bits) const
inline

Definition at line 178 of file APSInt.h.

References llvm::lltok::APSInt.

APSInt& llvm::APSInt::operator<<= ( unsigned  Amt)
inline

Definition at line 181 of file APSInt.h.

bool llvm::APSInt::operator<= ( const APSInt RHS) const
inline

Definition at line 140 of file APSInt.h.

References assert().

bool llvm::APSInt::operator<= ( int64_t  RHS) const
inline

Definition at line 162 of file APSInt.h.

APSInt& llvm::APSInt::operator= ( APInt  RHS)
inline

Definition at line 46 of file APSInt.h.

References llvm::APInt::operator=().

APSInt& llvm::APSInt::operator= ( uint64_t  RHS)
inline

Definition at line 52 of file APSInt.h.

References llvm::APInt::operator=().

bool llvm::APSInt::operator== ( const APSInt RHS) const
inline

Definition at line 148 of file APSInt.h.

References assert().

bool llvm::APSInt::operator== ( int64_t  RHS) const
inline

Definition at line 156 of file APSInt.h.

bool llvm::APSInt::operator> ( const APSInt RHS) const
inline

Definition at line 136 of file APSInt.h.

References assert().

bool llvm::APSInt::operator> ( int64_t  RHS) const
inline

Definition at line 171 of file APSInt.h.

bool llvm::APSInt::operator>= ( const APSInt RHS) const
inline

Definition at line 144 of file APSInt.h.

References assert().

bool llvm::APSInt::operator>= ( int64_t  RHS) const
inline

Definition at line 165 of file APSInt.h.

APSInt llvm::APSInt::operator>> ( unsigned  Amt) const
inline

Definition at line 124 of file APSInt.h.

References llvm::lltok::APSInt, llvm::APIntOps::ashr(), and llvm::APIntOps::lshr().

APSInt& llvm::APSInt::operator>>= ( unsigned  Amt)
inline

Definition at line 127 of file APSInt.h.

APSInt llvm::APSInt::operator^ ( const APSInt RHS) const
inline

Definition at line 246 of file APSInt.h.

References llvm::lltok::APSInt, and assert().

APSInt& llvm::APSInt::operator^= ( const APSInt RHS)
inline

Definition at line 228 of file APSInt.h.

References assert().

APSInt llvm::APSInt::operator| ( const APSInt RHS) const
inline

Definition at line 240 of file APSInt.h.

References llvm::lltok::APSInt, and assert().

APSInt& llvm::APSInt::operator|= ( const APSInt RHS)
inline

Definition at line 223 of file APSInt.h.

References assert().

APSInt llvm::APSInt::operator~ ( ) const
inline

Definition at line 264 of file APSInt.h.

References llvm::lltok::APSInt.

APSInt llvm::APSInt::Or ( const APSInt RHS) const
inline

Definition at line 244 of file APSInt.h.

References llvm::operator|().

void APSInt::Profile ( FoldingSetNodeID ID) const

Profile - Used to insert APSInt objects, or objects that contain APSInt objects, into FoldingSets.

Definition at line 40 of file APSInt.cpp.

References llvm::FoldingSetNodeID::AddInteger(), and llvm::APInt::Profile().

void llvm::APSInt::setIsSigned ( bool  Val)
inline

Definition at line 62 of file APSInt.h.

void llvm::APSInt::setIsUnsigned ( bool  Val)
inline

Definition at line 61 of file APSInt.h.

void llvm::APSInt::toString ( SmallVectorImpl< char > &  Str,
unsigned  Radix = 10 
) const
inline

toString - Append this APSInt to the specified SmallString.

Definition at line 65 of file APSInt.h.

References llvm::APInt::toString().

std::string llvm::APSInt::toString ( unsigned  Radix) const
inline

toString - Converts an APInt to a std::string.

This is an inefficient method; you should prefer passing in a SmallString instead.

Definition at line 70 of file APSInt.h.

References llvm::APInt::toString().

APSInt llvm::APSInt::trunc ( uint32_t  width) const
inline

Definition at line 81 of file APSInt.h.

References llvm::lltok::APSInt, and llvm::APInt::trunc().

APSInt llvm::APSInt::Xor ( const APSInt RHS) const
inline

Definition at line 250 of file APSInt.h.

References llvm::operator^().


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