X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FADT%2FDenseMap.h;h=e18be8963d48bda4032b4425b5a41762e062754b;hb=d6a2aab53e3c4fcd53399cfa6f66d62913e53663;hp=07995d7796c21215a3c3ffb3c8ecd10a66b9a648;hpb=11d8fb960963a1f8a7e2b2972bc560a5b24cf216;p=oota-llvm.git diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index 07995d7796c..e18be8963d4 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -346,12 +346,12 @@ private: // probe almost the entire table until it found the empty bucket. If the // table completely filled with tombstones, no lookup would ever succeed, // causing infinite loops in lookup. + ++NumEntries; if (NumEntries*4 >= NumBuckets*3 || NumBuckets-(NumEntries+NumTombstones) < NumBuckets/8) { this->grow(NumBuckets * 2); LookupBucketFor(Key, TheBucket); } - ++NumEntries; // If we are writing over a tombstone, remember this. if (!KeyInfoT::isEqual(TheBucket->first, getEmptyKey()))