projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef5fc95
)
DenseMap: assert that we have found a bucket before we try to insert into it.
author
Jordan Rose
<jordan_rose@apple.com>
Sat, 22 Sep 2012 01:24:16 +0000
(
01:24
+0000)
committer
Jordan Rose
<jordan_rose@apple.com>
Sat, 22 Sep 2012 01:24:16 +0000
(
01:24
+0000)
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
include/llvm/ADT/DenseMap.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/DenseMap.h
b/include/llvm/ADT/DenseMap.h
index
f60d688
..
cbcf789
100644
(file)
--- 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.