aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineLocation.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineLocation.h')
-rw-r--r--include/llvm/CodeGen/MachineLocation.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineLocation.h b/include/llvm/CodeGen/MachineLocation.h
index fdf28d6be2..21951b6680 100644
--- a/include/llvm/CodeGen/MachineLocation.h
+++ b/include/llvm/CodeGen/MachineLocation.h
@@ -41,6 +41,11 @@ public:
: IsRegister(true), Register(R), Offset(0) {}
MachineLocation(unsigned R, int O)
: IsRegister(false), Register(R), Offset(O) {}
+
+ bool operator==(const MachineLocation &Other) const {
+ return IsRegister == Other.IsRegister && Register == Other.Register &&
+ Offset == Other.Offset;
+ }
// Accessors
bool isReg() const { return IsRegister; }