[llvm-commits] [llvm] r164438 - /llvm/trunk/include/llvm/ADT/DenseMap.h
Jordan Rose
jordan_rose at apple.com
Fri Sep 21 18:24:16 PDT 2012
Author: jrose
Date: Fri Sep 21 20:24:16 2012
New Revision: 164438
URL: http://llvm.org/viewvc/llvm-project?rev=164438&view=rev
Log:
DenseMap: assert that we have found a bucket before we try to insert into it.
This silences literally dozens of analyzer warnings on LLVM (since DenseMap
is such a commonly-used class).
Modified:
llvm/trunk/include/llvm/ADT/DenseMap.h
Modified: llvm/trunk/include/llvm/ADT/DenseMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=164438&r1=164437&r2=164438&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/DenseMap.h (original)
+++ llvm/trunk/include/llvm/ADT/DenseMap.h Fri Sep 21 20:24:16 2012
@@ -423,6 +423,7 @@
this->grow(NumBuckets);
LookupBucketFor(Key, TheBucket);
}
+ assert(TheBucket);
// Only update the state after we've grown our bucket space appropriately
// so that when growing buckets we have self-consistent entry count.
More information about the llvm-commits
mailing list