diff options
author | Chris Lattner <sabre@nondot.org> | 2007-09-17 18:34:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-09-17 18:34:04 +0000 |
commit | 76c1b97e4020faace8c95a127f1eab66c278fb58 (patch) | |
tree | 9fbf93a4ca6637674eaffdef7af40539b80d9f4e /lib/Target/TargetData.cpp | |
parent | 430817ba181071d20f5c7c3ec4dcd5d8b8e318f4 (diff) |
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
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r-- | lib/Target/TargetData.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 9f7cb00379..5ab4a60ddc 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -316,9 +316,13 @@ struct DenseMapLayoutKeyInfo { 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; } }; |