From 09b44e9be7fd456b830282c06ec67de4815bbafa Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Thu, 5 Feb 2015 00:51:35 +0000 Subject: [PATCH] IR: Rename 'operator ==()' to 'isKeyOf()', NFC `isKeyOf()` is a clearer name than overloading `operator==()`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228242 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/LLVMContextImpl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/IR/LLVMContextImpl.h b/lib/IR/LLVMContextImpl.h index ee6c93bfd6d..3640495dd97 100644 --- a/lib/IR/LLVMContextImpl.h +++ b/lib/IR/LLVMContextImpl.h @@ -219,7 +219,7 @@ template <> struct MDNodeKeyImpl : MDNodeOpsKey { MDNodeKeyImpl(ArrayRef Ops) : MDNodeOpsKey(Ops) {} MDNodeKeyImpl(const MDTuple *N) : MDNodeOpsKey(N) {} - bool operator==(const MDTuple *RHS) const { return compareOps(RHS); } + bool isKeyOf(const MDTuple *RHS) const { return compareOps(RHS); } unsigned getHashValue() const { return getHash(); } @@ -243,7 +243,7 @@ template <> struct MDNodeKeyImpl { : Line(L->getLine()), Column(L->getColumn()), Scope(L->getScope()), InlinedAt(L->getInlinedAt()) {} - bool operator==(const MDLocation *RHS) const { + bool isKeyOf(const MDLocation *RHS) const { return Line == RHS->getLine() && Column == RHS->getColumn() && Scope == RHS->getScope() && InlinedAt == RHS->getInlinedAt(); } @@ -261,7 +261,7 @@ template <> struct MDNodeKeyImpl : MDNodeOpsKey { MDNodeKeyImpl(const GenericDebugNode *N) : MDNodeOpsKey(N, 1), Tag(N->getTag()), Header(N->getHeader()) {} - bool operator==(const GenericDebugNode *RHS) const { + bool isKeyOf(const GenericDebugNode *RHS) const { return Tag == RHS->getTag() && Header == RHS->getHeader() && compareOps(RHS, 1); } @@ -289,7 +289,7 @@ template struct MDNodeInfo { static bool isEqual(const KeyTy &LHS, const NodeTy *RHS) { if (RHS == getEmptyKey() || RHS == getTombstoneKey()) return false; - return LHS == RHS; + return LHS.isKeyOf(RHS); } static bool isEqual(const NodeTy *LHS, const NodeTy *RHS) { return LHS == RHS;