diff options
-rw-r--r-- | llvm/include/llvm/ADT/CachedHashString.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/ADT/CachedHashString.h b/llvm/include/llvm/ADT/CachedHashString.h index c3688cb6978..c86726e95d3 100644 --- a/llvm/include/llvm/ADT/CachedHashString.h +++ b/llvm/include/llvm/ADT/CachedHashString.h @@ -61,7 +61,8 @@ template <> struct DenseMapInfo<CachedHashStringRef> { } static bool isEqual(const CachedHashStringRef &LHS, const CachedHashStringRef &RHS) { - return DenseMapInfo<StringRef>::isEqual(LHS.val(), RHS.val()); + return LHS.hash() == RHS.hash() && + DenseMapInfo<StringRef>::isEqual(LHS.val(), RHS.val()); } }; |