summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
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
commit7a426b5f2e7976496848c37eeee9251362c6bd0d (patch)
tree440b0e83784f9ff6f8788a89a978b5674eb57688 /llvm/lib/MC
parent372cf15125a05f21f6a5973d184a3ebb07154cb8 (diff)
downloadbcm5719-llvm-7a426b5f2e7976496848c37eeee9251362c6bd0d.tar.gz
bcm5719-llvm-7a426b5f2e7976496848c37eeee9251362c6bd0d.zip
Compute hashes directly with hash_combine instead of taking a detour through FoldingSetNodeID.
llvm-svn: 154495
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index e16f7aea078..84a34f1d873 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -21,7 +21,7 @@
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SourceMgr.h"
-#include "llvm/ADT/FoldingSet.h"
+#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Config/config.h"
@@ -1361,12 +1361,10 @@ namespace llvm {
return CIEKey::getTombstoneKey();
}
static unsigned getHashValue(const CIEKey &Key) {
- FoldingSetNodeID ID;
- ID.AddPointer(Key.Personality);
- ID.AddInteger(Key.PersonalityEncoding);
- ID.AddInteger(Key.LsdaEncoding);
- ID.AddBoolean(Key.IsSignalFrame);
- return ID.ComputeHash();
+ return static_cast<unsigned>(hash_combine(Key.Personality,
+ Key.PersonalityEncoding,
+ Key.LsdaEncoding,
+ Key.IsSignalFrame));
}
static bool isEqual(const CIEKey &LHS,
const CIEKey &RHS) {
OpenPOWER on IntegriCloud