LLVM API Documentation
#include <APSInt.h>
Public Member Functions | |
| APSInt () | |
| Default constructor that creates an uninitialized APInt. | |
| APSInt (uint32_t BitWidth, bool isUnsigned=true) | |
| APSInt (const APInt &I, bool isUnsigned=true) | |
| APSInt & | operator= (const APSInt &RHS) |
| APSInt & | operator= (const APInt &RHS) |
| APSInt & | operator= (uint64_t RHS) |
| Assignment operator. | |
| 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 |
| APSInt & | extend (uint32_t width) |
| APSInt & | extOrTrunc (uint32_t width) |
| 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) |
| Left-shift assignment function. | |
| APSInt & | operator++ () |
| Prefix increment operator. | |
| APSInt & | operator-- () |
| Prefix decrement operator. | |
| APSInt | operator++ (int) |
| APSInt | operator-- (int) |
| Postfix decrement operator. | |
| APSInt | operator- () const |
| Unary negation operator. | |
| APSInt & | operator+= (const APSInt &RHS) |
| APSInt & | operator-= (const APSInt &RHS) |
| APSInt & | operator*= (const APSInt &RHS) |
| APSInt & | operator &= (const APSInt &RHS) |
| APSInt & | operator|= (const APSInt &RHS) |
| APSInt & | operator^= (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 |
| Unary bitwise complement operator. | |
| void | Profile (FoldingSetNodeID &ID) const |
Static Public Member Functions | |
| static APSInt | getMaxValue (uint32_t numBits, bool Unsigned) |
| static APSInt | getMinValue (uint32_t numBits, bool Unsigned) |
Definition at line 22 of file APSInt.h.
| llvm::APSInt::APSInt | ( | ) | [inline, explicit] |
Default constructor that creates an uninitialized APInt.
Definition at line 26 of file APSInt.h.
Referenced by getMaxValue(), getMinValue(), operator &(), operator%(), operator*(), operator+(), operator++(), operator-(), operator--(), operator/(), operator<<(), operator>>(), operator^(), operator|(), and operator~().
| 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.
Definition at line 42 of file APSInt.h.
References llvm::APInt::operator=().
| APSInt& llvm::APSInt::operator= | ( | uint64_t | RHS | ) | [inline] |
Assignment operator.
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.
Definition at line 48 of file APSInt.h.
References llvm::APInt::operator=().
| bool llvm::APSInt::isSigned | ( | ) | const [inline] |
| void llvm::APSInt::toString | ( | SmallVectorImpl< char > & | Str, | |
| unsigned | Radix = 10 | |||
| ) | const [inline] |
toString - Append this APSInt to the specified SmallString.
Definition at line 61 of file APSInt.h.
References isSigned(), and 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, your should prefer passing in a SmallString instead.
Definition at line 66 of file APSInt.h.
References isSigned(), and llvm::APInt::toString().
| APSInt& llvm::APSInt::extend | ( | uint32_t | width | ) | [inline] |
| APSInt& llvm::APSInt::extOrTrunc | ( | uint32_t | width | ) | [inline] |
Definition at line 79 of file APSInt.h.
References llvm::APInt::sextOrTrunc(), and llvm::APInt::zextOrTrunc().
Definition at line 87 of file APSInt.h.
References IsUnsigned, llvm::APInt::srem(), and llvm::APInt::urem().
Definition at line 95 of file APSInt.h.
References IsUnsigned, llvm::APInt::sdiv(), and llvm::APInt::udiv().
Definition at line 103 of file APSInt.h.
References APSInt(), IsUnsigned, llvm::APInt::srem(), and llvm::APInt::urem().
Definition at line 107 of file APSInt.h.
References APSInt(), IsUnsigned, llvm::APInt::sdiv(), and llvm::APInt::udiv().
Definition at line 112 of file APSInt.h.
References APSInt(), llvm::APInt::ashr(), and llvm::APInt::lshr().
| bool llvm::APSInt::operator< | ( | const APSInt & | RHS | ) | const [inline] |
Definition at line 120 of file APSInt.h.
References IsUnsigned, llvm::APInt::slt(), and llvm::APInt::ult().
| bool llvm::APSInt::operator> | ( | const APSInt & | RHS | ) | const [inline] |
Definition at line 124 of file APSInt.h.
References IsUnsigned, llvm::APInt::sgt(), and llvm::APInt::ugt().
| bool llvm::APSInt::operator<= | ( | const APSInt & | RHS | ) | const [inline] |
Definition at line 128 of file APSInt.h.
References IsUnsigned, llvm::APInt::sle(), and llvm::APInt::ule().
| bool llvm::APSInt::operator>= | ( | const APSInt & | RHS | ) | const [inline] |
Definition at line 132 of file APSInt.h.
References IsUnsigned, llvm::APInt::sge(), and llvm::APInt::uge().
Left-shift assignment function.
Shifts *this left by shiftAmt and assigns the result to *this.
Reimplemented from llvm::APInt.
| APSInt& llvm::APSInt::operator++ | ( | ) | [inline] |
Prefix increment operator.
Prefix increment operator. Increments the APInt by one.
Reimplemented from llvm::APInt.
| APSInt& llvm::APSInt::operator-- | ( | ) | [inline] |
Prefix decrement operator.
Prefix decrement operator. Decrements the APInt by one.
Reimplemented from llvm::APInt.
| APSInt llvm::APSInt::operator++ | ( | int | ) | [inline] |
| APSInt llvm::APSInt::operator-- | ( | int | ) | [inline] |
Postfix decrement operator.
Reimplemented from llvm::APInt.
Definition at line 159 of file APSInt.h.
References APSInt().
| APSInt llvm::APSInt::operator- | ( | ) | const [inline] |
Unary negation operator.
Negates *this using two's complement logic.
Reimplemented from llvm::APInt.
Definition at line 162 of file APSInt.h.
References APSInt().
| APSInt llvm::APSInt::operator~ | ( | ) | 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.
Definition at line 239 of file APSInt.h.
References APSInt(), llvm::APInt::getMaxValue(), and llvm::APInt::getSignedMaxValue().
| 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.
Definition at line 246 of file APSInt.h.
References APSInt(), llvm::APInt::getMinValue(), and llvm::APInt::getSignedMinValue().
| void APSInt::Profile | ( | FoldingSetNodeID & | ID | ) | const |
Profile - Used to insert APSInt objects, or objects that contain APSInt objects, into FoldingSets.
Reimplemented from llvm::APInt.
Definition at line 20 of file APSInt.cpp.
References llvm::FoldingSetNodeID::AddInteger(), and llvm::APInt::Profile().