Skip to content

Commit 9106b5e

Browse files
committed
[CodeGen] Make ShapeT::operator== const. NFC.
Otherwise it becomes asymmetric in the types it accepts.
1 parent 17d5ba5 commit 9106b5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/CodeGen/TileShapeInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ShapeT {
3838
ShapeT()
3939
: Row(nullptr), Col(nullptr), RowImm(InvalidImmShape),
4040
ColImm(InvalidImmShape) {}
41-
bool operator==(const ShapeT &Shape) {
41+
bool operator==(const ShapeT &Shape) const {
4242
MachineOperand *R = Shape.Row;
4343
MachineOperand *C = Shape.Col;
4444
if (!R || !C)
@@ -52,7 +52,7 @@ class ShapeT {
5252
return false;
5353
}
5454

55-
bool operator!=(const ShapeT &Shape) { return !(*this == Shape); }
55+
bool operator!=(const ShapeT &Shape) const { return !(*this == Shape); }
5656

5757
MachineOperand *getRow() const { return Row; }
5858

0 commit comments

Comments
 (0)