#include <APSInt.h>
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) | |
APSInt & | operator= (const APSInt &RHS) |
APSInt & | operator= (const APInt &RHS) |
APSInt & | operator= (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 APSInt & | operator%= (const APSInt &RHS) |
const APSInt & | operator/= (const APSInt &RHS) |
APSInt | operator% (const APSInt &RHS) const |
APSInt | operator/ (const APSInt &RHS) const |
APSInt | operator>> (unsigned Amt) const |
APSInt & | operator>>= (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 |
APSInt & | operator<<= (unsigned Amt) |
Shifts *this left by shiftAmt and assigns the result to *this. | |
APSInt & | operator++ () |
Prefix increment operator. | |
APSInt & | operator-- () |
Prefix decrement operator. | |
APSInt | operator++ (int) |
APSInt | operator-- (int) |
Postfix decrement operator. | |
APSInt | operator- () const |
Negates *this using two's complement logic. | |
APSInt & | operator+= (const APSInt &RHS) |
Adds RHS to *this and assigns the result to *this. | |
APSInt & | operator-= (const APSInt &RHS) |
Subtracts RHS from *this and assigns the result to *this. | |
APSInt & | operator*= (const APSInt &RHS) |
Multiplies this APInt by RHS and assigns the result to *this. | |
APSInt & | operator&= (const APSInt &RHS) |
Performs a bitwise AND operation on this APInt and RHS. | |
APSInt & | operator|= (const APSInt &RHS) |
Performs a bitwise OR operation on this APInt and RHS. | |
APSInt & | operator^= (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 |
llvm::APSInt::APSInt | ( | ) | [inline, explicit] |
Default constructor that creates an uninitialized APInt.
llvm::APSInt::APSInt | ( | uint32_t | BitWidth, | |
bool | isUnsigned = true | |||
) | [inline, explicit] |
llvm::APSInt::APSInt | ( | const APInt & | I, | |
bool | isUnsigned = true | |||
) | [inline, explicit] |
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] |
Reimplemented from llvm::APInt.
Performs a bitwise AND operation on this APInt and RHS.
The result is assigned to *this.
Reimplemented from llvm::APInt.
Multiplies this APInt by RHS and returns the result.
Multiplication operator.
Reimplemented from llvm::APInt.
Multiplies this APInt by RHS and assigns the result to *this.
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.
Reimplemented from llvm::APInt.
Adds RHS to *this and assigns the result to *this.
Adds the RHS APint to this APInt.
Reimplemented from llvm::APInt.
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.
Reimplemented from llvm::APInt.
APSInt llvm::APSInt::operator-- | ( | int | ) | [inline] |
Postfix decrement operator.
Reimplemented from llvm::APInt.
APSInt& llvm::APSInt::operator-- | ( | ) | [inline] |
Prefix decrement operator.
Prefix decrement operator. Decrements the APInt by one.
Reimplemented from llvm::APInt.
Subtracts RHS from *this and assigns the result to *this.
Subtracts the RHS APInt from this APInt.
Reimplemented from llvm::APInt.
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.
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.
Reimplemented from llvm::APInt.
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] |
Performs a bitwise XOR operation on *this and RHS.
Reimplemented from llvm::APInt.
Performs a bitwise XOR operation on this APInt and RHS.
The result is assigned to *this.
Reimplemented from llvm::APInt.
Performs a bitwise OR operation on *this and RHS.
Reimplemented from llvm::APInt.
Performs a bitwise OR operation on this APInt and RHS.
The result is assigned *this;
Reimplemented from llvm::APInt.
APSInt llvm::APSInt::operator~ | ( | ) | const [inline] |
Performs a bitwise complement operation on this APInt.
Reimplemented from llvm::APInt.
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] |
Reimplemented from llvm::APInt.
bool llvm::APSInt::IsUnsigned [private] |