diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-05 00:51:35 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-05 00:51:35 +0000 |
commit | 9c26d80c18618dae55a65454b54e05ef33c2d786 (patch) | |
tree | 959b3b7bab75094bd3036d16d19744009eec0b0c /llvm/lib | |
parent | 1fcccdd78efacac1b1e100ba96b530a54d6b4d8d (diff) | |
download | bcm5719-llvm-9c26d80c18618dae55a65454b54e05ef33c2d786.tar.gz bcm5719-llvm-9c26d80c18618dae55a65454b54e05ef33c2d786.zip |
IR: Rename 'operator ==()' to 'isKeyOf()', NFC
`isKeyOf()` is a clearer name than overloading `operator==()`.
llvm-svn: 228242
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/IR/LLVMContextImpl.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h index ee6c93bfd6d..3640495dd97 100644 --- a/llvm/lib/IR/LLVMContextImpl.h +++ b/llvm/lib/IR/LLVMContextImpl.h @@ -219,7 +219,7 @@ template <> struct MDNodeKeyImpl<MDTuple> : MDNodeOpsKey { MDNodeKeyImpl(ArrayRef<Metadata *> 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<MDLocation> { : 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<GenericDebugNode> : 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 <class NodeTy> 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; |