summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/APValue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/APValue.cpp')
-rw-r--r--clang/lib/AST/APValue.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/AST/APValue.cpp b/clang/lib/AST/APValue.cpp
index e7902e68780..9ed756d9d84 100644
--- a/clang/lib/AST/APValue.cpp
+++ b/clang/lib/AST/APValue.cpp
@@ -58,16 +58,13 @@ llvm::DenseMapInfo<clang::APValue::LValueBase>::getTombstoneKey() {
DenseMapInfo<unsigned>::getTombstoneKey());
}
-namespace clang {
-llvm::hash_code hash_value(const APValue::LValueBase &Base) {
- return llvm::hash_combine(Base.getOpaqueValue(), Base.getCallIndex(),
- Base.getVersion());
-}
-}
-
unsigned llvm::DenseMapInfo<clang::APValue::LValueBase>::getHashValue(
const clang::APValue::LValueBase &Base) {
- return hash_value(Base);
+ llvm::FoldingSetNodeID ID;
+ ID.AddPointer(Base.getOpaqueValue());
+ ID.AddInteger(Base.getCallIndex());
+ ID.AddInteger(Base.getVersion());
+ return ID.ComputeHash();
}
bool llvm::DenseMapInfo<clang::APValue::LValueBase>::isEqual(
OpenPOWER on IntegriCloud