Add a unit test for 'swap', and fix a pile of bugs in
authorChandler Carruth <chandlerc@gmail.com>
Sun, 17 Jun 2012 11:28:13 +0000 (11:28 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 17 Jun 2012 11:28:13 +0000 (11:28 +0000)
commit8dffa4a106b52d893388c94c24e365e14c468b7c
tree1a935bd3a620dfe303b47b0c2e4272aa1ecb4cb4
parent3967f503f4ea623d3300a785f5f1c333230f24a9
Add a unit test for 'swap', and fix a pile of bugs in
SmallDenseMap::swap.

First, make it parse cleanly. Yay for uninstantiated methods.

Second, make the inline-buckets case work correctly. This is way
trickier than it should be due to the uninitialized values in empty and
tombstone buckets.

Finally fix a few typos that caused construction/destruction mismatches
in the counting unittest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158641 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/DenseMap.h
unittests/ADT/DenseMapTest.cpp