From 2c5e9d71aba3b1a85f07c08d2c09d40b8547264b Mon Sep 17 00:00:00 2001 From: dim Date: Thu, 3 May 2012 16:50:55 +0000 Subject: Vendor import of llvm release_31 branch r155985: http://llvm.org/svn/llvm-project/llvm/branches/release_31@155985 --- lib/Support/SmallPtrSet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/Support/SmallPtrSet.cpp') diff --git a/lib/Support/SmallPtrSet.cpp b/lib/Support/SmallPtrSet.cpp index 68d9c29..3b53e9f 100644 --- a/lib/Support/SmallPtrSet.cpp +++ b/lib/Support/SmallPtrSet.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "llvm/ADT/SmallPtrSet.h" +#include "llvm/ADT/DenseMapInfo.h" #include "llvm/Support/MathExtras.h" #include #include @@ -102,7 +103,7 @@ bool SmallPtrSetImpl::erase_imp(const void * Ptr) { } const void * const *SmallPtrSetImpl::FindBucketFor(const void *Ptr) const { - unsigned Bucket = Hash(Ptr); + unsigned Bucket = DenseMapInfo::getHashValue(Ptr) & (CurArraySize-1); unsigned ArraySize = CurArraySize; unsigned ProbeAmt = 1; const void *const *Array = CurArray; -- cgit v1.1