[llvm] 9106b5e - [CodeGen] Make ShapeT::operator== const. NFC.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 19 04:25:26 PST 2022
Author: Benjamin Kramer
Date: 2022-02-19T13:25:09+01:00
New Revision: 9106b5e546c95537957ca9e34cc12cd62ff00112
URL: https://github.com/llvm/llvm-project/commit/9106b5e546c95537957ca9e34cc12cd62ff00112
DIFF: https://github.com/llvm/llvm-project/commit/9106b5e546c95537957ca9e34cc12cd62ff00112.diff
LOG: [CodeGen] Make ShapeT::operator== const. NFC.
Otherwise it becomes asymmetric in the types it accepts.
Added:
Modified:
llvm/include/llvm/CodeGen/TileShapeInfo.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/TileShapeInfo.h b/llvm/include/llvm/CodeGen/TileShapeInfo.h
index 4e574bd96cca4..1b5f902139fbf 100644
--- a/llvm/include/llvm/CodeGen/TileShapeInfo.h
+++ b/llvm/include/llvm/CodeGen/TileShapeInfo.h
@@ -38,7 +38,7 @@ class ShapeT {
ShapeT()
: Row(nullptr), Col(nullptr), RowImm(InvalidImmShape),
ColImm(InvalidImmShape) {}
- bool operator==(const ShapeT &Shape) {
+ bool operator==(const ShapeT &Shape) const {
MachineOperand *R = Shape.Row;
MachineOperand *C = Shape.Col;
if (!R || !C)
@@ -52,7 +52,7 @@ class ShapeT {
return false;
}
- bool operator!=(const ShapeT &Shape) { return !(*this == Shape); }
+ bool operator!=(const ShapeT &Shape) const { return !(*this == Shape); }
MachineOperand *getRow() const { return Row; }
More information about the llvm-commits
mailing list