summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/DenseMap.h
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-09-22 01:24:16 +0000
committerJordan Rose <jordan_rose@apple.com>2012-09-22 01:24:16 +0000
commit3bbdddf527c762085802544665d6e77471ea035b (patch)
treee98ae293d20e78bbe115a188814a95aa3d1948e1 /include/llvm/ADT/DenseMap.h
parentef5fc952e8de9c76ff00cd7638ae85cf709264bd (diff)
downloadllvm-3bbdddf527c762085802544665d6e77471ea035b.tar.gz
llvm-3bbdddf527c762085802544665d6e77471ea035b.tar.bz2
llvm-3bbdddf527c762085802544665d6e77471ea035b.tar.xz
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/DenseMap.h')
-rw-r--r--include/llvm/ADT/DenseMap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h
index f60d688c0d..cbcf7892c9 100644
--- a/include/llvm/ADT/DenseMap.h
+++ b/include/llvm/ADT/DenseMap.h
@@ -423,6 +423,7 @@ private:
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.