diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-07-28 06:48:33 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-07-28 06:48:33 +0000 |
commit | 297738fa95d4bb7849c197926f4d4abdcd812e40 (patch) | |
tree | 7c3d2bb00273fa11da34f78652032bf610ac8fb8 /include/llvm/ADT | |
parent | e8ce880f1a66dffcad7955868be5193e782c09ca (diff) | |
download | llvm-297738fa95d4bb7849c197926f4d4abdcd812e40.tar.gz llvm-297738fa95d4bb7849c197926f4d4abdcd812e40.tar.bz2 llvm-297738fa95d4bb7849c197926f4d4abdcd812e40.tar.xz |
In DenseMapInfo<pair<T, U>> tombstone key, use the tombstone for T and U instead
of the empty key for U. This shouldn't really matter because the tombstone key
for the pair was still distinct from every other key, but it is odd. Patch by
Michael Ilseman!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136336 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/DenseMapInfo.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/DenseMapInfo.h b/include/llvm/ADT/DenseMapInfo.h index 744b6f4aef..23bfdefd1c 100644 --- a/include/llvm/ADT/DenseMapInfo.h +++ b/include/llvm/ADT/DenseMapInfo.h @@ -142,7 +142,7 @@ struct DenseMapInfo<std::pair<T, U> > { } static inline Pair getTombstoneKey() { return std::make_pair(FirstInfo::getTombstoneKey(), - SecondInfo::getEmptyKey()); + SecondInfo::getTombstoneKey()); } static unsigned getHashValue(const Pair& PairVal) { uint64_t key = (uint64_t)FirstInfo::getHashValue(PairVal.first) << 32 @@ -158,7 +158,7 @@ struct DenseMapInfo<std::pair<T, U> > { return (unsigned)key; } static bool isEqual(const Pair &LHS, const Pair &RHS) { - return FirstInfo::isEqual(LHS.first, RHS.first) && + return FirstInfo::isEqual(LHS.first, RHS.first) && SecondInfo::isEqual(LHS.second, RHS.second); } }; |