llvm::APSInt Class Reference

#include <APSInt.h>

Inheritance diagram for llvm::APSInt:
llvm::APInt

List of all members.

Public Member Functions

 APSInt ()
 Default constructor that creates an uninitialized APInt.
 APSInt (uint32_t BitWidth, bool isUnsigned=true)
 APSInt ctor - Create an APSInt with the specified width, default to unsigned.
 APSInt (const APInt &I, bool isUnsigned=true)
APSIntoperator= (const APSInt &RHS)
APSIntoperator= (const APInt &RHS)
APSIntoperator= (uint64_t RHS)
 The RHS value is assigned to *this.
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.
std::string toString (unsigned Radix) const
 toString - Converts an APInt to a std::string.
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
APSInt operator<< (unsigned Bits) const
APSIntoperator<<= (unsigned Amt)
 Shifts *this left by shiftAmt and assigns the result to *this.
APSIntoperator++ ()
 Prefix increment operator.
APSIntoperator-- ()
 Prefix decrement operator.
APSInt operator++ (int)
APSInt operator-- (int)
 Postfix decrement operator.
APSInt operator- () const
 Negates *this using two's complement logic.
APSIntoperator+= (const APSInt &RHS)
 Adds RHS to *this and assigns the result to *this.
APSIntoperator-= (const APSInt &RHS)
 Subtracts RHS from *this and assigns the result to *this.
APSIntoperator*= (const APSInt &RHS)
 Multiplies this APInt by RHS and assigns the result to *this.
APSIntoperator&= (const APSInt &RHS)
 Performs a bitwise AND operation on this APInt and RHS.
APSIntoperator|= (const APSInt &RHS)
 Performs a bitwise OR operation on this APInt and RHS.
APSIntoperator^= (const APSInt &RHS)
 Performs a bitwise XOR operation on this APInt and RHS.
APSInt operator& (const APSInt &RHS) const
APSInt And (const APSInt &RHS) const
APSInt operator| (const APSInt &RHS) const
 Performs a bitwise OR operation on *this and RHS.
APSInt Or (const APSInt &RHS) const
APSInt operator^ (const APSInt &RHS) const
 Performs a bitwise XOR operation on *this and RHS.
APSInt Xor (const APSInt &RHS) const
APSInt operator* (const APSInt &RHS) const
 Multiplies this APInt by RHS and returns the result.
APSInt operator+ (const APSInt &RHS) const
 Adds RHS to this APInt and returns the result.
APSInt operator- (const APSInt &RHS) const
 Subtracts RHS from this APInt and returns the result.
APSInt operator~ () const
 Performs a bitwise complement operation on this APInt.
void Profile (FoldingSetNodeID &ID) const
 Profile - Used to insert APSInt objects, or objects that contain APSInt objects, into FoldingSets.

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.
static APSInt getMinValue (uint32_t numBits, bool Unsigned)
 getMinValue - Return the APSInt representing the minimum integer value with the given bit width and signedness.

Private Attributes

bool IsUnsigned

Constructor & Destructor Documentation

llvm::APSInt::APSInt (  )  [inline, explicit]

Default constructor that creates an uninitialized APInt.

llvm::APSInt::APSInt ( uint32_t  BitWidth,
bool  isUnsigned = true 
) [inline, explicit]

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

llvm::APSInt::APSInt ( const APInt I,
bool  isUnsigned = true 
) [inline, explicit]

Member Function Documentation

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

Reimplemented from llvm::APInt.

APSInt llvm::APSInt::extend ( uint32_t  width  )  const [inline]
APSInt llvm::APSInt::extOrTrunc ( uint32_t  width  )  const [inline]
static APSInt llvm::APSInt::getMaxValue ( uint32_t  numBits,
bool  Unsigned 
) [inline, static]

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

static APSInt llvm::APSInt::getMinValue ( uint32_t  numBits,
bool  Unsigned 
) [inline, static]

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

bool llvm::APSInt::isSigned (  )  const [inline]
bool llvm::APSInt::isUnsigned (  )  const [inline]
APSInt llvm::APSInt::operator% ( const APSInt RHS  )  const [inline]
const APSInt& llvm::APSInt::operator%= ( const APSInt RHS  )  [inline]
APSInt llvm::APSInt::operator& ( const APSInt RHS  )  const [inline]

Reimplemented from llvm::APInt.

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

Performs a bitwise AND operation on this APInt and RHS.

The result is assigned to *this.

Returns:
*this after ANDing with RHS. Bitwise AND assignment operator.

Reimplemented from llvm::APInt.

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

Multiplies this APInt by RHS and returns the result.

Multiplication operator.

Reimplemented from llvm::APInt.

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

Multiplies this APInt by RHS and assigns the result to *this.

Returns:
*this Multiplication assignment operator.

Reimplemented from llvm::APInt.

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

Adds RHS to this APInt and returns the result.

Addition operator.

Reimplemented from llvm::APInt.

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

Reimplemented from llvm::APInt.

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

Prefix increment operator.

Prefix increment operator. Increments the APInt by one.

Returns:
*this incremented by one

Reimplemented from llvm::APInt.

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

Adds RHS to *this and assigns the result to *this.

Adds the RHS APint to this APInt.

Returns:
*this Addition assignment operator.
this, after addition of RHS. Addition assignment operator.

Reimplemented from llvm::APInt.

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

Subtracts RHS from this APInt and returns the result.

Subtraction operator.

Reimplemented from llvm::APInt.

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

Negates *this using two's complement logic.

Returns:
An APInt value representing the negation of *this. Unary negation operator

Reimplemented from llvm::APInt.

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

Postfix decrement operator.

Returns:
a new APInt representing *this decremented by one.

Reimplemented from llvm::APInt.

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

Prefix decrement operator.

Prefix decrement operator. Decrements the APInt by one.

Returns:
*this decremented by one.

Reimplemented from llvm::APInt.

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

Subtracts RHS from *this and assigns the result to *this.

Subtracts the RHS APInt from this APInt.

Returns:
*this Subtraction assignment operator.
this, after subtraction Subtraction assignment operator.

Reimplemented from llvm::APInt.

APSInt llvm::APSInt::operator/ ( const APSInt RHS  )  const [inline]
const APSInt& llvm::APSInt::operator/= ( const APSInt RHS  )  [inline]
bool llvm::APSInt::operator< ( const APSInt RHS  )  const [inline]
APSInt llvm::APSInt::operator<< ( unsigned  Bits  )  const [inline]

Reimplemented from llvm::APInt.

APSInt& llvm::APSInt::operator<<= ( unsigned  shiftAmt  )  [inline]

Shifts *this left by shiftAmt and assigns the result to *this.

Returns:
*this after shifting left by shiftAmt Left-shift assignment function.

Reimplemented from llvm::APInt.

bool llvm::APSInt::operator<= ( const APSInt RHS  )  const [inline]
APSInt& llvm::APSInt::operator= ( uint64_t  RHS  )  [inline]

The RHS value is assigned to *this.

If the significant bits in RHS exceed the bit width, the excess bits are truncated. If the bit width is larger than 64, the value is zero filled in the unspecified high order bits.

Returns:
*this after assignment of RHS value. Assignment operator.

Reimplemented from llvm::APInt.

APSInt& llvm::APSInt::operator= ( const APInt RHS  )  [inline]
APSInt& llvm::APSInt::operator= ( const APSInt RHS  )  [inline]

Reimplemented from llvm::APInt.

bool llvm::APSInt::operator> ( const APSInt RHS  )  const [inline]
bool llvm::APSInt::operator>= ( const APSInt RHS  )  const [inline]
APSInt llvm::APSInt::operator>> ( unsigned  Amt  )  const [inline]
APSInt& llvm::APSInt::operator>>= ( unsigned  Amt  )  [inline]
APSInt llvm::APSInt::operator^ ( const APSInt RHS  )  const [inline]

Performs a bitwise XOR operation on *this and RHS.

Returns:
An APInt value representing the bitwise XOR of *this and RHS. Bitwise XOR operator.

Reimplemented from llvm::APInt.

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

Performs a bitwise XOR operation on this APInt and RHS.

The result is assigned to *this.

Returns:
*this after XORing with RHS. Bitwise XOR assignment operator.

Reimplemented from llvm::APInt.

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

Performs a bitwise OR operation on *this and RHS.

Returns:
An APInt value representing the bitwise OR of *this and RHS. Bitwise OR operator.

Reimplemented from llvm::APInt.

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

Performs a bitwise OR operation on this APInt and RHS.

The result is assigned *this;

Returns:
*this after ORing with RHS. Bitwise OR assignment operator.

Reimplemented from llvm::APInt.

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

Performs a bitwise complement operation on this APInt.

Returns:
an APInt that is the bitwise complement of *this Unary bitwise complement operator.

Reimplemented from llvm::APInt.

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

Reimplemented from llvm::APInt.

void llvm::APSInt::Profile ( FoldingSetNodeID &  ID  )  const

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

Reimplemented from llvm::APInt.

void llvm::APSInt::setIsSigned ( bool  Val  )  [inline]
void llvm::APSInt::setIsUnsigned ( bool  Val  )  [inline]
std::string llvm::APSInt::toString ( unsigned  Radix  )  const [inline]

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

This is an inefficient method, your should prefer passing in a SmallString instead.

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

toString - Append this APSInt to the specified SmallString.

APSInt llvm::APSInt::trunc ( uint32_t  width  )  const [inline]
APSInt llvm::APSInt::Xor ( const APSInt RHS  )  const [inline]

Reimplemented from llvm::APInt.


Member Data Documentation

bool llvm::APSInt::IsUnsigned [private]

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

Generated on 2 Nov 2013 for Galois by  doxygen 1.6.1