Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfo
Add a new DenseMapInfo::isEqual method to allow clients to redefine
the equality predicate used when probing the hash table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42042 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index 9f7cb00..5ab4a60 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -316,9 +316,13 @@
return LayoutKey((TargetData*)(intptr_t)-1, 0);
}
static unsigned getHashValue(const LayoutKey &Val) {
- return DenseMapKeyInfo<void*>::getHashValue(Val.first) ^
- DenseMapKeyInfo<void*>::getHashValue(Val.second);
+ return DenseMapInfo<void*>::getHashValue(Val.first) ^
+ DenseMapInfo<void*>::getHashValue(Val.second);
}
+ static bool isEqual(const LayoutKey &LHS, const LayoutKey &RHS) {
+ return LHS == RHS;
+ }
+
static bool isPod() { return true; }
};