summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/StringMap.h
diff options
context:
space:
mode:
authorPedro Artigas <partigas@apple.com>2013-02-21 21:32:00 +0000
committerPedro Artigas <partigas@apple.com>2013-02-21 21:32:00 +0000
commit633e24dc043c32ddfcfcf6181fe976e218dcb57a (patch)
tree8feef8acf1cc108fd7824625df2401119f94b05a /include/llvm/ADT/StringMap.h
parent700ed80d3da5e98e05ceb90e9bfb66058581a6db (diff)
downloadllvm-633e24dc043c32ddfcfcf6181fe976e218dcb57a.tar.gz
llvm-633e24dc043c32ddfcfcf6181fe976e218dcb57a.tar.bz2
llvm-633e24dc043c32ddfcfcf6181fe976e218dcb57a.tar.xz
Clear the whole table including the tombstones, since the tombstone count will
be set to zero that is what it was intended. Should improve performance of the data structure when clear is invoked frequently (both compile time and memory usage). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/StringMap.h')
-rw-r--r--include/llvm/ADT/StringMap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/StringMap.h b/include/llvm/ADT/StringMap.h
index 7e40a075ed..d01437b61c 100644
--- a/include/llvm/ADT/StringMap.h
+++ b/include/llvm/ADT/StringMap.h
@@ -338,8 +338,8 @@ public:
StringMapEntryBase *&Bucket = TheTable[I];
if (Bucket && Bucket != getTombstoneVal()) {
static_cast<MapEntryTy*>(Bucket)->Destroy(Allocator);
- Bucket = 0;
}
+ Bucket = 0;
}
NumItems = 0;