summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/StringMap.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-30 18:32:41 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-03-30 18:32:41 +0000
commit5ca05e18017ef75393faaaba7c75d8995e24f6ba (patch)
tree7010fa5537b1ccdda01938f101d1b5c562fe5c1f /llvm/lib/Support/StringMap.cpp
parent32e0a7509c6f769401a01033168f071853612ede (diff)
downloadbcm5719-llvm-5ca05e18017ef75393faaaba7c75d8995e24f6ba.tar.gz
bcm5719-llvm-5ca05e18017ef75393faaaba7c75d8995e24f6ba.zip
Prevent infinite growth of the DenseMap.
When the hash function uses object pointers all free entries eventually become tombstones as they are used at least once, regardless of the size. DenseMap cannot function with zero empty keys, so it double size to get get ridof the tombstones. However DenseMap never shrinks automatically unless it is cleared, so the net result is that certain tables grow infinitely. The solution is to make a fresh copy of the table without tombstones instead of doubling size, by simply calling grow with the current size. Patch by José Fonseca! llvm-svn: 128564
Diffstat (limited to 'llvm/lib/Support/StringMap.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud