Skip to content

Commit 8c058dd

Browse files
committed
[SVE] Remove TypeSize comparison operators
All known instances in the code where we relied upon the TypeSize comparison operators have now been changed to either use scalar interger comparisons or one of the TypeSize::isKnownXY functions. It is now safe to remove the comparison operators. Differential Revision: https://reviews.llvm.org/D90160
1 parent 58a6b7b commit 8c058dd

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

llvm/include/llvm/Support/TypeSize.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -206,25 +206,6 @@ class TypeSize : public PolySize<uint64_t> {
206206
uint64_t getFixedSize() const { return getFixedValue(); }
207207
uint64_t getKnownMinSize() const { return getKnownMinValue(); }
208208

209-
friend bool operator<(const TypeSize &LHS, const TypeSize &RHS) {
210-
assert(LHS.IsScalable == RHS.IsScalable &&
211-
"Ordering comparison of scalable and fixed types");
212-
213-
return LHS.MinVal < RHS.MinVal;
214-
}
215-
216-
friend bool operator>(const TypeSize &LHS, const TypeSize &RHS) {
217-
return RHS < LHS;
218-
}
219-
220-
friend bool operator<=(const TypeSize &LHS, const TypeSize &RHS) {
221-
return !(RHS < LHS);
222-
}
223-
224-
friend bool operator>=(const TypeSize &LHS, const TypeSize& RHS) {
225-
return !(LHS < RHS);
226-
}
227-
228209
TypeSize &operator-=(TypeSize RHS) {
229210
assert(IsScalable == RHS.IsScalable &&
230211
"Subtraction using mixed scalable and fixed types");

0 commit comments

Comments
 (0)