Lines Matching defs:IsUnsigned

23   bool IsUnsigned;
27 explicit APSInt() : IsUnsigned(false) {}
32 : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {}
35 : APInt(std::move(I)), IsUnsigned(isUnsigned) {}
59 bool isSigned() const { return !IsUnsigned; }
60 bool isUnsigned() const { return IsUnsigned; }
61 void setIsUnsigned(bool Val) { IsUnsigned = Val; }
62 void setIsSigned(bool Val) { IsUnsigned = !Val; }
82 return APSInt(APInt::trunc(width), IsUnsigned);
86 if (IsUnsigned)
87 return APSInt(zext(width), IsUnsigned);
89 return APSInt(sext(width), IsUnsigned);
93 if (IsUnsigned)
94 return APSInt(zextOrTrunc(width), IsUnsigned);
96 return APSInt(sextOrTrunc(width), IsUnsigned);
100 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
101 if (IsUnsigned)
108 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
109 if (IsUnsigned)
116 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
117 return IsUnsigned ? APSInt(urem(RHS), true) : APSInt(srem(RHS), false);
120 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
121 return IsUnsigned ? APSInt(udiv(RHS), true) : APSInt(sdiv(RHS), false);
125 return IsUnsigned ? APSInt(lshr(Amt), true) : APSInt(ashr(Amt), false);
133 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
134 return IsUnsigned ? ult(RHS) : slt(RHS);
137 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
138 return IsUnsigned ? ugt(RHS) : sgt(RHS);
141 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
142 return IsUnsigned ? ule(RHS) : sle(RHS);
145 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
146 return IsUnsigned ? uge(RHS) : sge(RHS);
149 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
179 return APSInt(static_cast<const APInt&>(*this) << Bits, IsUnsigned);
195 return APSInt(++static_cast<APInt&>(*this), IsUnsigned);
198 return APSInt(--static_cast<APInt&>(*this), IsUnsigned);
201 return APSInt(-static_cast<const APInt&>(*this), IsUnsigned);
204 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
209 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
214 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
219 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
224 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
229 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
235 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
236 return APSInt(static_cast<const APInt&>(*this) & RHS, IsUnsigned);
243 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
244 return APSInt(static_cast<const APInt&>(*this) | RHS, IsUnsigned);
251 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
252 return APSInt(static_cast<const APInt&>(*this) ^ RHS, IsUnsigned);
259 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
260 return APSInt(static_cast<const APInt&>(*this) * RHS, IsUnsigned);
263 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
264 return APSInt(static_cast<const APInt&>(*this) + RHS, IsUnsigned);
267 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
268 return APSInt(static_cast<const APInt&>(*this) - RHS, IsUnsigned);
271 return APSInt(~static_cast<const APInt&>(*this), IsUnsigned);