aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/SmallVectorTest.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-06-17 10:33:51 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-06-17 10:33:51 +0000
commita1be842f984ea0670d1faa2f587e3690f3c396e5 (patch)
tree9e9c91f794d933d0b83026bcd43c8855fbf292da /llvm/unittests/ADT/SmallVectorTest.cpp
parent20dd838ae532b70115a8cb84bb9e6857cad6015c (diff)
downloadllvm-a1be842f984ea0670d1faa2f587e3690f3c396e5.zip
llvm-a1be842f984ea0670d1faa2f587e3690f3c396e5.tar.gz
llvm-a1be842f984ea0670d1faa2f587e3690f3c396e5.tar.bz2
Add tests for *DenesMap for both key and value types' construction and
destruction and fix a bug in SmallDenseMap they caught. This is kind of a poor-man's version of the testing that just adds the addresses to a set on construction and removes them on destruction. We check that double construction and double destruction don't occur. Amusingly enough, this is enough to catch a lot of SmallDenseMap issues because we spend a lot of time with fixed stable addresses in the inline buffer. The SmallDenseMap bug fix included makes grow() not double-destroy in some cases. It also fixes a FIXME there, the code was pretty crappy. We now don't have any wasted initialization, but we do move the entries in inline bucket array an extra time. It's probably a better tradeoff, and is much easier to get correct. llvm-svn: 158639
Diffstat (limited to 'llvm/unittests/ADT/SmallVectorTest.cpp')
0 files changed, 0 insertions, 0 deletions