LLVM  3.7.0
APSInt.h
Go to the documentation of this file.
1 //===-- llvm/ADT/APSInt.h - Arbitrary Precision Signed Int -----*- C++ -*--===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements the APSInt class, which is a simple class that
11 // represents an arbitrary sized integer that knows its signedness.
12 //
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_ADT_APSINT_H
16 #define LLVM_ADT_APSINT_H
17 
18 #include "llvm/ADT/APInt.h"
19 
20 namespace llvm {
21 
22 class APSInt : public APInt {
23  bool IsUnsigned;
24 public:
25  /// Default constructor that creates an uninitialized APInt.
26  explicit APSInt() : IsUnsigned(false) {}
27 
28  /// APSInt ctor - Create an APSInt with the specified width, default to
29  /// unsigned.
30  explicit APSInt(uint32_t BitWidth, bool isUnsigned = true)
31  : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {}
32 
33  explicit APSInt(APInt I, bool isUnsigned = true)
34  : APInt(std::move(I)), IsUnsigned(isUnsigned) {}
35 
36  /// Construct an APSInt from a string representation.
37  ///
38  /// This constructor interprets the string \p Str using the radix of 10.
39  /// The interpretation stops at the end of the string. The bit width of the
40  /// constructed APSInt is determined automatically.
41  ///
42  /// \param Str the string to be interpreted.
43  explicit APSInt(StringRef Str);
44 
46  // Retain our current sign.
47  APInt::operator=(std::move(RHS));
48  return *this;
49  }
50 
51  APSInt &operator=(uint64_t RHS) {
52  // Retain our current sign.
53  APInt::operator=(RHS);
54  return *this;
55  }
56 
57  // Query sign information.
58  bool isSigned() const { return !IsUnsigned; }
59  bool isUnsigned() const { return IsUnsigned; }
60  void setIsUnsigned(bool Val) { IsUnsigned = Val; }
61  void setIsSigned(bool Val) { IsUnsigned = !Val; }
62 
63  /// toString - Append this APSInt to the specified SmallString.
64  void toString(SmallVectorImpl<char> &Str, unsigned Radix = 10) const {
65  APInt::toString(Str, Radix, isSigned());
66  }
67  /// toString - Converts an APInt to a std::string. This is an inefficient
68  /// method; you should prefer passing in a SmallString instead.
69  std::string toString(unsigned Radix) const {
70  return APInt::toString(Radix, isSigned());
71  }
72  using APInt::toString;
73 
74  /// \brief Get the correctly-extended \c int64_t value.
75  int64_t getExtValue() const {
76  assert(getMinSignedBits() <= 64 && "Too many bits for int64_t");
77  return isSigned() ? getSExtValue() : getZExtValue();
78  }
79 
80  APSInt LLVM_ATTRIBUTE_UNUSED_RESULT trunc(uint32_t width) const {
81  return APSInt(APInt::trunc(width), IsUnsigned);
82  }
83 
84  APSInt LLVM_ATTRIBUTE_UNUSED_RESULT extend(uint32_t width) const {
85  if (IsUnsigned)
86  return APSInt(zext(width), IsUnsigned);
87  else
88  return APSInt(sext(width), IsUnsigned);
89  }
90 
92  if (IsUnsigned)
93  return APSInt(zextOrTrunc(width), IsUnsigned);
94  else
95  return APSInt(sextOrTrunc(width), IsUnsigned);
96  }
97 
98  const APSInt &operator%=(const APSInt &RHS) {
99  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
100  if (IsUnsigned)
101  *this = urem(RHS);
102  else
103  *this = srem(RHS);
104  return *this;
105  }
106  const APSInt &operator/=(const APSInt &RHS) {
107  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
108  if (IsUnsigned)
109  *this = udiv(RHS);
110  else
111  *this = sdiv(RHS);
112  return *this;
113  }
114  APSInt operator%(const APSInt &RHS) const {
115  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
116  return IsUnsigned ? APSInt(urem(RHS), true) : APSInt(srem(RHS), false);
117  }
118  APSInt operator/(const APSInt &RHS) const {
119  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
120  return IsUnsigned ? APSInt(udiv(RHS), true) : APSInt(sdiv(RHS), false);
121  }
122 
123  APSInt operator>>(unsigned Amt) const {
124  return IsUnsigned ? APSInt(lshr(Amt), true) : APSInt(ashr(Amt), false);
125  }
126  APSInt& operator>>=(unsigned Amt) {
127  *this = *this >> Amt;
128  return *this;
129  }
130 
131  inline bool operator<(const APSInt& RHS) const {
132  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
133  return IsUnsigned ? ult(RHS) : slt(RHS);
134  }
135  inline bool operator>(const APSInt& RHS) const {
136  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
137  return IsUnsigned ? ugt(RHS) : sgt(RHS);
138  }
139  inline bool operator<=(const APSInt& RHS) const {
140  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
141  return IsUnsigned ? ule(RHS) : sle(RHS);
142  }
143  inline bool operator>=(const APSInt& RHS) const {
144  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
145  return IsUnsigned ? uge(RHS) : sge(RHS);
146  }
147  inline bool operator==(const APSInt& RHS) const {
148  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
149  return eq(RHS);
150  }
151  inline bool operator!=(const APSInt& RHS) const {
152  return !((*this) == RHS);
153  }
154 
155  bool operator==(int64_t RHS) const {
156  return compareValues(*this, get(RHS)) == 0;
157  }
158  bool operator!=(int64_t RHS) const {
159  return compareValues(*this, get(RHS)) != 0;
160  }
161  bool operator<=(int64_t RHS) const {
162  return compareValues(*this, get(RHS)) <= 0;
163  }
164  bool operator>=(int64_t RHS) const {
165  return compareValues(*this, get(RHS)) >= 0;
166  }
167  bool operator<(int64_t RHS) const {
168  return compareValues(*this, get(RHS)) < 0;
169  }
170  bool operator>(int64_t RHS) const {
171  return compareValues(*this, get(RHS)) > 0;
172  }
173 
174  // The remaining operators just wrap the logic of APInt, but retain the
175  // signedness information.
176 
177  APSInt operator<<(unsigned Bits) const {
178  return APSInt(static_cast<const APInt&>(*this) << Bits, IsUnsigned);
179  }
180  APSInt& operator<<=(unsigned Amt) {
181  *this = *this << Amt;
182  return *this;
183  }
184 
186  ++(static_cast<APInt&>(*this));
187  return *this;
188  }
190  --(static_cast<APInt&>(*this));
191  return *this;
192  }
194  return APSInt(++static_cast<APInt&>(*this), IsUnsigned);
195  }
197  return APSInt(--static_cast<APInt&>(*this), IsUnsigned);
198  }
199  APSInt operator-() const {
200  return APSInt(-static_cast<const APInt&>(*this), IsUnsigned);
201  }
202  APSInt& operator+=(const APSInt& RHS) {
203  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
204  static_cast<APInt&>(*this) += RHS;
205  return *this;
206  }
207  APSInt& operator-=(const APSInt& RHS) {
208  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
209  static_cast<APInt&>(*this) -= RHS;
210  return *this;
211  }
212  APSInt& operator*=(const APSInt& RHS) {
213  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
214  static_cast<APInt&>(*this) *= RHS;
215  return *this;
216  }
217  APSInt& operator&=(const APSInt& RHS) {
218  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
219  static_cast<APInt&>(*this) &= RHS;
220  return *this;
221  }
222  APSInt& operator|=(const APSInt& RHS) {
223  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
224  static_cast<APInt&>(*this) |= RHS;
225  return *this;
226  }
227  APSInt& operator^=(const APSInt& RHS) {
228  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
229  static_cast<APInt&>(*this) ^= RHS;
230  return *this;
231  }
232 
233  APSInt operator&(const APSInt& RHS) const {
234  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
235  return APSInt(static_cast<const APInt&>(*this) & RHS, IsUnsigned);
236  }
238  return this->operator&(RHS);
239  }
240 
241  APSInt operator|(const APSInt& RHS) const {
242  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
243  return APSInt(static_cast<const APInt&>(*this) | RHS, IsUnsigned);
244  }
246  return this->operator|(RHS);
247  }
248 
249 
250  APSInt operator^(const APSInt& RHS) const {
251  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
252  return APSInt(static_cast<const APInt&>(*this) ^ RHS, IsUnsigned);
253  }
255  return this->operator^(RHS);
256  }
257 
258  APSInt operator*(const APSInt& RHS) const {
259  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
260  return APSInt(static_cast<const APInt&>(*this) * RHS, IsUnsigned);
261  }
262  APSInt operator+(const APSInt& RHS) const {
263  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
264  return APSInt(static_cast<const APInt&>(*this) + RHS, IsUnsigned);
265  }
266  APSInt operator-(const APSInt& RHS) const {
267  assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
268  return APSInt(static_cast<const APInt&>(*this) - RHS, IsUnsigned);
269  }
270  APSInt operator~() const {
271  return APSInt(~static_cast<const APInt&>(*this), IsUnsigned);
272  }
273 
274  /// getMaxValue - Return the APSInt representing the maximum integer value
275  /// with the given bit width and signedness.
276  static APSInt getMaxValue(uint32_t numBits, bool Unsigned) {
277  return APSInt(Unsigned ? APInt::getMaxValue(numBits)
278  : APInt::getSignedMaxValue(numBits), Unsigned);
279  }
280 
281  /// getMinValue - Return the APSInt representing the minimum integer value
282  /// with the given bit width and signedness.
283  static APSInt getMinValue(uint32_t numBits, bool Unsigned) {
284  return APSInt(Unsigned ? APInt::getMinValue(numBits)
285  : APInt::getSignedMinValue(numBits), Unsigned);
286  }
287 
288  /// \brief Determine if two APSInts have the same value, zero- or
289  /// sign-extending as needed.
290  static bool isSameValue(const APSInt &I1, const APSInt &I2) {
291  return !compareValues(I1, I2);
292  }
293 
294  /// \brief Compare underlying values of two numbers.
295  static int compareValues(const APSInt &I1, const APSInt &I2) {
296  if (I1.getBitWidth() == I2.getBitWidth() && I1.isSigned() == I2.isSigned())
297  return I1 == I2 ? 0 : I1 > I2 ? 1 : -1;
298 
299  // Check for a bit-width mismatch.
300  if (I1.getBitWidth() > I2.getBitWidth())
301  return compareValues(I1, I2.extend(I1.getBitWidth()));
302  else if (I2.getBitWidth() > I1.getBitWidth())
303  return compareValues(I1.extend(I2.getBitWidth()), I2);
304 
305  // We have a signedness mismatch. Check for negative values and do an
306  // unsigned compare if both are positive.
307  if (I1.isSigned()) {
308  assert(!I2.isSigned() && "Expected signed mismatch");
309  if (I1.isNegative())
310  return -1;
311  } else {
312  assert(I2.isSigned() && "Expected signed mismatch");
313  if (I2.isNegative())
314  return 1;
315  }
316 
317  return I1.eq(I2) ? 0 : I1.ugt(I2) ? 1 : -1;
318  }
319 
320  static APSInt get(int64_t X) { return APSInt(APInt(64, X), false); }
321  static APSInt getUnsigned(uint64_t X) { return APSInt(APInt(64, X), true); }
322 
323  /// Profile - Used to insert APSInt objects, or objects that contain APSInt
324  /// objects, into FoldingSets.
325  void Profile(FoldingSetNodeID& ID) const;
326 };
327 
328 inline bool operator==(int64_t V1, const APSInt &V2) { return V2 == V1; }
329 inline bool operator!=(int64_t V1, const APSInt &V2) { return V2 != V1; }
330 inline bool operator<=(int64_t V1, const APSInt &V2) { return V2 >= V1; }
331 inline bool operator>=(int64_t V1, const APSInt &V2) { return V2 <= V1; }
332 inline bool operator<(int64_t V1, const APSInt &V2) { return V2 > V1; }
333 inline bool operator>(int64_t V1, const APSInt &V2) { return V2 < V1; }
334 
335 inline raw_ostream &operator<<(raw_ostream &OS, const APSInt &I) {
336  I.print(OS, I.isSigned());
337  return OS;
338 }
339 
340 } // end namespace llvm
341 
342 #endif
APSInt operator-(const APSInt &RHS) const
Definition: APSInt.h:266
APInt LLVM_ATTRIBUTE_UNUSED_RESULT ashr(unsigned shiftAmt) const
Arithmetic right-shift function.
Definition: APInt.cpp:1051
const APSInt & operator/=(const APSInt &RHS)
Definition: APSInt.h:106
#define LLVM_ATTRIBUTE_UNUSED_RESULT
Definition: Compiler.h:128
uint64_t getZExtValue() const
Get zero extended value.
Definition: APInt.h:1327
APSInt & operator-=(const APSInt &RHS)
Definition: APSInt.h:207
void print(raw_ostream &OS, bool isSigned) const
Definition: APInt.cpp:2279
bool operator>(int64_t V1, const APSInt &V2)
Definition: APSInt.h:333
APSInt()
Default constructor that creates an uninitialized APInt.
Definition: APSInt.h:26
APSInt(uint32_t BitWidth, bool isUnsigned=true)
APSInt ctor - Create an APSInt with the specified width, default to unsigned.
Definition: APSInt.h:30
APSInt operator>>(unsigned Amt) const
Definition: APSInt.h:123
void setIsSigned(bool Val)
Definition: APSInt.h:61
APSInt & operator^=(const APSInt &RHS)
Definition: APSInt.h:227
APInt LLVM_ATTRIBUTE_UNUSED_RESULT zextOrTrunc(unsigned width) const
Zero extend or truncate to width.
Definition: APInt.cpp:1015
bool isSigned() const
Definition: APSInt.h:58
static APInt getSignedMaxValue(unsigned numBits)
Gets maximum signed value of APInt for a specific bit width.
Definition: APInt.h:426
void setIsUnsigned(bool Val)
Definition: APSInt.h:60
APSInt operator&(const APSInt &RHS) const
Definition: APSInt.h:233
APSInt operator~() const
Definition: APSInt.h:270
bool operator>=(int64_t RHS) const
Definition: APSInt.h:164
bool operator<=(int64_t V1, const APSInt &V2)
Definition: APSInt.h:330
bool isNegative() const
Determine sign of this APInt.
Definition: APInt.h:319
APSInt operator<<(unsigned Bits) const
Definition: APSInt.h:177
APInt LLVM_ATTRIBUTE_UNUSED_RESULT urem(const APInt &RHS) const
Unsigned remainder operation.
Definition: APInt.cpp:1887
int64_t getExtValue() const
Get the correctly-extended int64_t value.
Definition: APSInt.h:75
bool operator>=(const APSInt &RHS) const
Definition: APSInt.h:143
bool operator<=(const APSInt &RHS) const
Definition: APSInt.h:139
bool operator>=(int64_t V1, const APSInt &V2)
Definition: APSInt.h:331
APInt()
Default constructor that creates an uninitialized APInt.
Definition: APInt.h:301
APSInt & operator--()
Definition: APSInt.h:189
APSInt LLVM_ATTRIBUTE_UNUSED_RESULT extend(uint32_t width) const
Definition: APSInt.h:84
APInt LLVM_ATTRIBUTE_UNUSED_RESULT lshr(unsigned shiftAmt) const
Logical right-shift function.
Definition: APInt.cpp:1142
#define false
Definition: ConvertUTF.c:65
This file implements a class to represent arbitrary precision integral constant values and operations...
APSInt & operator<<=(unsigned Amt)
Definition: APSInt.h:180
bool operator!=(int64_t RHS) const
Definition: APSInt.h:158
APSInt & operator*=(const APSInt &RHS)
Definition: APSInt.h:212
APSInt operator|(const APSInt &RHS) const
Definition: APSInt.h:241
bool sgt(const APInt &RHS) const
Signed greather than comparison.
Definition: APInt.h:1119
APSInt operator/(const APSInt &RHS) const
Definition: APSInt.h:118
bool operator==(const APSInt &RHS) const
Definition: APSInt.h:147
unsigned getMinSignedBits() const
Get the minimum bit size for this signed APInt.
Definition: APInt.h:1316
bool ult(const APInt &RHS) const
Unsigned less than comparison.
Definition: APInt.cpp:520
bool operator>(const APSInt &RHS) const
Definition: APSInt.h:135
static bool isSameValue(const APSInt &I1, const APSInt &I2)
Determine if two APSInts have the same value, zero- or sign-extending as needed.
Definition: APSInt.h:290
FoldingSetNodeID - This class is used to gather all the unique data bits of a node.
Definition: FoldingSet.h:297
bool operator<(int64_t RHS) const
Definition: APSInt.h:167
void toString(SmallVectorImpl< char > &Str, unsigned Radix, bool Signed, bool formatAsCLiteral=false) const
Converts an APInt to a string and append it to Str.
Definition: APInt.cpp:2143
bool eq(const APInt &RHS) const
Equality comparison.
Definition: APInt.h:1001
APInt LLVM_ATTRIBUTE_UNUSED_RESULT trunc(unsigned width) const
Truncate to new width.
Definition: APInt.cpp:932
bool sge(const APInt &RHS) const
Signed greather or equal comparison.
Definition: APInt.h:1153
APSInt operator--(int)
Definition: APSInt.h:196
int64_t getSExtValue() const
Get sign extended value.
Definition: APInt.h:1339
APSInt LLVM_ATTRIBUTE_UNUSED_RESULT Xor(const APSInt &RHS) const
Definition: APSInt.h:254
APInt & operator=(const APInt &RHS)
Copy assignment operator.
Definition: APInt.h:651
APInt LLVM_ATTRIBUTE_UNUSED_RESULT sext(unsigned width) const
Sign extend to a new width.
Definition: APInt.cpp:955
bool sle(const APInt &RHS) const
Signed less or equal comparison.
Definition: APInt.h:1085
APSInt operator++(int)
Definition: APSInt.h:193
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
unsigned getBitWidth() const
Return the number of bits in the APInt.
Definition: APInt.h:1273
bool uge(const APInt &RHS) const
Unsigned greater or equal comparison.
Definition: APInt.h:1137
APInt LLVM_ATTRIBUTE_UNUSED_RESULT sdiv(const APInt &RHS) const
Signed division function for APInt.
Definition: APInt.cpp:1876
APSInt & operator++()
Definition: APSInt.h:185
bool operator>(int64_t RHS) const
Definition: APSInt.h:170
APSInt & operator=(uint64_t RHS)
Definition: APSInt.h:51
bool operator!=(const APSInt &RHS) const
Definition: APSInt.h:151
void toString(SmallVectorImpl< char > &Str, unsigned Radix=10) const
toString - Append this APSInt to the specified SmallString.
Definition: APSInt.h:64
APInt LLVM_ATTRIBUTE_UNUSED_RESULT srem(const APInt &RHS) const
Function for signed remainder operation.
Definition: APInt.cpp:1924
APSInt & operator&=(const APSInt &RHS)
Definition: APSInt.h:217
bool ugt(const APInt &RHS) const
Unsigned greather than comparison.
Definition: APInt.h:1101
static APSInt getMaxValue(uint32_t numBits, bool Unsigned)
getMaxValue - Return the APSInt representing the maximum integer value with the given bit width and s...
Definition: APSInt.h:276
bool slt(const APInt &RHS) const
Signed less than comparison.
Definition: APInt.cpp:552
APSInt LLVM_ATTRIBUTE_UNUSED_RESULT extOrTrunc(uint32_t width) const
Definition: APSInt.h:91
static APSInt getMinValue(uint32_t numBits, bool Unsigned)
getMinValue - Return the APSInt representing the minimum integer value with the given bit width and s...
Definition: APSInt.h:283
APSInt & operator|=(const APSInt &RHS)
Definition: APSInt.h:222
void Profile(FoldingSetNodeID &ID) const
Profile - Used to insert APSInt objects, or objects that contain APSInt objects, into FoldingSets...
Definition: APSInt.cpp:39
static APInt getMinValue(unsigned numBits)
Gets minimum unsigned value of APInt for a specific bit width.
Definition: APInt.h:433
APSInt LLVM_ATTRIBUTE_UNUSED_RESULT trunc(uint32_t width) const
Definition: APSInt.h:80
Class for arbitrary precision integers.
Definition: APInt.h:73
APSInt operator%(const APSInt &RHS) const
Definition: APSInt.h:114
bool operator<(const APSInt &RHS) const
Definition: APSInt.h:131
static APInt getMaxValue(unsigned numBits)
Gets maximum unsigned value of APInt for specific bit width.
Definition: APInt.h:421
const APSInt & operator%=(const APSInt &RHS)
Definition: APSInt.h:98
bool operator!=(uint64_t V1, const APInt &V2)
Definition: APInt.h:1736
APInt LLVM_ATTRIBUTE_UNUSED_RESULT udiv(const APInt &RHS) const
Unsigned division operation.
Definition: APInt.cpp:1839
APSInt(APInt I, bool isUnsigned=true)
Definition: APSInt.h:33
#define I(x, y, z)
Definition: MD5.cpp:54
bool operator<=(int64_t RHS) const
Definition: APSInt.h:161
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
Definition: APInt.h:1738
APSInt & operator+=(const APSInt &RHS)
Definition: APSInt.h:202
static APSInt getUnsigned(uint64_t X)
Definition: APSInt.h:321
static APInt getSignedMinValue(unsigned numBits)
Gets minimum signed value of APInt for a specific bit width.
Definition: APInt.h:436
bool operator<(int64_t V1, const APSInt &V2)
Definition: APSInt.h:332
APInt LLVM_ATTRIBUTE_UNUSED_RESULT sextOrTrunc(unsigned width) const
Sign extend or truncate to width.
Definition: APInt.cpp:1023
APSInt LLVM_ATTRIBUTE_UNUSED_RESULT Or(const APSInt &RHS) const
Definition: APSInt.h:245
static int compareValues(const APSInt &I1, const APSInt &I2)
Compare underlying values of two numbers.
Definition: APSInt.h:295
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:38
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:40
APSInt & operator>>=(unsigned Amt)
Definition: APSInt.h:126
APInt LLVM_ATTRIBUTE_UNUSED_RESULT zext(unsigned width) const
Zero extend to a new width.
Definition: APInt.cpp:996
bool operator==(uint64_t V1, const APInt &V2)
Definition: APInt.h:1734
APSInt operator*(const APSInt &RHS) const
Definition: APSInt.h:258
APSInt LLVM_ATTRIBUTE_UNUSED_RESULT And(const APSInt &RHS) const
Definition: APSInt.h:237
bool operator==(int64_t RHS) const
Definition: APSInt.h:155
APSInt operator+(const APSInt &RHS) const
Definition: APSInt.h:262
APSInt operator-() const
Definition: APSInt.h:199
bool ule(const APInt &RHS) const
Unsigned less or equal comparison.
Definition: APInt.h:1069
std::string toString(unsigned Radix) const
toString - Converts an APInt to a std::string.
Definition: APSInt.h:69
bool isUnsigned() const
Definition: APSInt.h:59
APSInt operator^(const APSInt &RHS) const
Definition: APSInt.h:250
APSInt & operator=(APInt RHS)
Definition: APSInt.h:45