Home | History | Annotate | Download | only in ADT

Lines Matching defs:IsUnsigned

23   bool IsUnsigned;
26 explicit APSInt() : IsUnsigned(false) {}
30 explicit APSInt(uint32_t BitWidth, bool isUnsigned = true)
31 : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {}
33 explicit APSInt(const APInt &I, bool isUnsigned = true)
34 : APInt(I), IsUnsigned(isUnsigned) {}
38 IsUnsigned = RHS.IsUnsigned;
55 bool isSigned() const { return !IsUnsigned; }
56 bool isUnsigned() const { return IsUnsigned; }
57 void setIsUnsigned(bool Val) { IsUnsigned = Val; }
58 void setIsSigned(bool Val) { IsUnsigned = !Val; }
72 return APSInt(APInt::trunc(width), IsUnsigned);
76 if (IsUnsigned)
77 return APSInt(zext(width), IsUnsigned);
79 return APSInt(sext(width), IsUnsigned);
83 if (IsUnsigned)
84 return APSInt(zextOrTrunc(width), IsUnsigned);
86 return APSInt(sextOrTrunc(width), IsUnsigned);
90 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
91 if (IsUnsigned)
98 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
99 if (IsUnsigned)
106 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
107 return IsUnsigned ? APSInt(urem(RHS), true) : APSInt(srem(RHS), false);
110 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
111 return IsUnsigned ? APSInt(udiv(RHS), true) : APSInt(sdiv(RHS), false);
115 return IsUnsigned ? APSInt(lshr(Amt), true) : APSInt(ashr(Amt), false);
123 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
124 return IsUnsigned ? ult(RHS) : slt(RHS);
127 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
128 return IsUnsigned ? ugt(RHS) : sgt(RHS);
131 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
132 return IsUnsigned ? ule(RHS) : sle(RHS);
135 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
136 return IsUnsigned ? uge(RHS) : sge(RHS);
139 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
156 return APSInt(static_cast<const APInt&>(*this) << Bits, IsUnsigned);
172 return APSInt(++static_cast<APInt&>(*this), IsUnsigned);
175 return APSInt(--static_cast<APInt&>(*this), IsUnsigned);
178 return APSInt(-static_cast<const APInt&>(*this), IsUnsigned);
181 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
186 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
191 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
196 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
201 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
206 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
212 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
213 return APSInt(static_cast<const APInt&>(*this) & RHS, IsUnsigned);
220 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
221 return APSInt(static_cast<const APInt&>(*this) | RHS, IsUnsigned);
229 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
230 return APSInt(static_cast<const APInt&>(*this) ^ RHS, IsUnsigned);
237 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
238 return APSInt(static_cast<const APInt&>(*this) * RHS, IsUnsigned);
241 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
242 return APSInt(static_cast<const APInt&>(*this) + RHS, IsUnsigned);
245 assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!");
246 return APSInt(static_cast<const APInt&>(*this) - RHS, IsUnsigned);
249 return APSInt(~static_cast<const APInt&>(*this), IsUnsigned);