Lines Matching refs:Boolean

25 class Boolean final {
32 Boolean() : V(false) {} in Boolean() function
33 explicit Boolean(bool V) : V(V) {} in Boolean() function
35 bool operator<(Boolean RHS) const { return V < RHS.V; }
36 bool operator>(Boolean RHS) const { return V > RHS.V; }
37 bool operator<=(Boolean RHS) const { return V <= RHS.V; }
38 bool operator>=(Boolean RHS) const { return V >= RHS.V; }
39 bool operator==(Boolean RHS) const { return V == RHS.V; }
40 bool operator!=(Boolean RHS) const { return V != RHS.V; }
44 Boolean operator-() const { return Boolean(V); }
45 Boolean operator-(const Boolean &Other) const { return Boolean(V - Other.V); }
46 Boolean operator~() const { return Boolean(true); }
61 Boolean toUnsigned() const { return *this; } in toUnsigned()
74 ComparisonCategoryResult compare(const Boolean &RHS) const { in compare()
80 Boolean truncate(unsigned TruncBits) const { return *this; } in truncate()
90 static Boolean min(unsigned NumBits) { return Boolean(false); } in min()
91 static Boolean max(unsigned NumBits) { return Boolean(true); } in max()
93 template <typename T> static Boolean from(T Value) { in from()
95 return Boolean(Value != 0); in from()
96 return Boolean(static_cast<decltype(Boolean::V)>(Value) != 0); in from()
100 static std::enable_if_t<SrcBits != 0, Boolean>
102 return Boolean(!Value.isZero()); in from()
105 static Boolean zero() { return from(false); } in zero()
108 static Boolean from(T Value, unsigned NumBits) { in from()
109 return Boolean(Value); in from()
116 static bool increment(Boolean A, Boolean *R) { in increment()
117 *R = Boolean(true); in increment()
121 static bool decrement(Boolean A, Boolean *R) { in decrement()
125 static bool add(Boolean A, Boolean B, unsigned OpBits, Boolean *R) { in add()
126 *R = Boolean(A.V || B.V); in add()
130 static bool sub(Boolean A, Boolean B, unsigned OpBits, Boolean *R) { in sub()
131 *R = Boolean(A.V ^ B.V); in sub()
135 static bool mul(Boolean A, Boolean B, unsigned OpBits, Boolean *R) { in mul()
136 *R = Boolean(A.V && B.V); in mul()
140 static bool inv(Boolean A, Boolean *R) { in inv()
141 *R = Boolean(!A.V); in inv()
145 static bool neg(Boolean A, Boolean *R) { in neg()
146 *R = Boolean(A.V); in neg()
151 inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Boolean &B) {