diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index 7a4694f9663..554a7511ed8 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -116,10 +116,15 @@ public: return DbgValueLocation(NewLocNo, WasIndirect); } - bool operator==(const DbgValueLocation &O) const { - return LocNo == O.LocNo && WasIndirect == O.WasIndirect; + friend inline bool operator==(const DbgValueLocation &LHS, + const DbgValueLocation &RHS) { + return LHS.LocNo == RHS.LocNo && LHS.WasIndirect == RHS.WasIndirect; + } + + friend inline bool operator!=(const DbgValueLocation &LHS, + const DbgValueLocation &RHS) { + return !(LHS == RHS); } - bool operator!=(const DbgValueLocation &O) const { return !(*this == O); } private: unsigned LocNo : 31; |