summaryrefslogtreecommitdiff
path: root/lib/VMCore/DebugLoc.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-04-11 14:06:39 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-04-11 14:06:39 +0000
commit7484920cf5d95b21fa750229f8ce0d1624c918ec (patch)
treeb3318292d8f657420479537410510a1ac2d8ef56 /lib/VMCore/DebugLoc.cpp
parent91794872cefaf6c2652abad640048784bd6b0d02 (diff)
downloadllvm-7484920cf5d95b21fa750229f8ce0d1624c918ec.tar.gz
llvm-7484920cf5d95b21fa750229f8ce0d1624c918ec.tar.bz2
llvm-7484920cf5d95b21fa750229f8ce0d1624c918ec.tar.xz
Compute hashes directly with hash_combine instead of taking a detour through FoldingSetNodeID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/DebugLoc.cpp')
-rw-r--r--lib/VMCore/DebugLoc.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/VMCore/DebugLoc.cpp b/lib/VMCore/DebugLoc.cpp
index 328244f806..9013d28bb6 100644
--- a/lib/VMCore/DebugLoc.cpp
+++ b/lib/VMCore/DebugLoc.cpp
@@ -173,10 +173,7 @@ DebugLoc DenseMapInfo<DebugLoc>::getTombstoneKey() {
}
unsigned DenseMapInfo<DebugLoc>::getHashValue(const DebugLoc &Key) {
- FoldingSetNodeID ID;
- ID.AddInteger(Key.LineCol);
- ID.AddInteger(Key.ScopeIdx);
- return ID.ComputeHash();
+ return static_cast<unsigned>(hash_combine(Key.LineCol, Key.ScopeIdx));
}
bool DenseMapInfo<DebugLoc>::isEqual(const DebugLoc &LHS, const DebugLoc &RHS) {