diff options
| author | Jordan Rose <jordan_rose@apple.com> | 2012-09-22 01:24:16 +0000 |
|---|---|---|
| committer | Jordan Rose <jordan_rose@apple.com> | 2012-09-22 01:24:16 +0000 |
| commit | 08f3b9167fc1ed887bd4b97b98f1d1cf6e98d7ac (patch) | |
| tree | 8b8f575b2619b79c01497dcf1a09873bc5c89610 /llvm | |
| parent | 6d12af7410a8fec24b9522875ef8ceb385c78d56 (diff) | |
| download | bcm5719-llvm-08f3b9167fc1ed887bd4b97b98f1d1cf6e98d7ac.tar.gz bcm5719-llvm-08f3b9167fc1ed887bd4b97b98f1d1cf6e98d7ac.zip | |
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).
llvm-svn: 164438
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/ADT/DenseMap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h index f60d688c0dc..cbcf7892c97 100644 --- a/llvm/include/llvm/ADT/DenseMap.h +++ b/llvm/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. |

