aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-07 01:11:25 +0000
committerChris Lattner <sabre@nondot.org>2007-02-07 01:11:25 +0000
commite237cf934fcb8a25746e068f543fbd6db44eaa70 (patch)
treec4474877c0d1318c0f257ea7c598110066e61bb0 /include
parent04a3115e619740245cbe34c8c7428b4bde7868f7 (diff)
downloadexternal_llvm-e237cf934fcb8a25746e068f543fbd6db44eaa70.zip
external_llvm-e237cf934fcb8a25746e068f543fbd6db44eaa70.tar.gz
external_llvm-e237cf934fcb8a25746e068f543fbd6db44eaa70.tar.bz2
do not let the table fill up with tombstones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/SmallPtrSet.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h
index ed7f4da..1db2945 100644
--- a/include/llvm/ADT/SmallPtrSet.h
+++ b/include/llvm/ADT/SmallPtrSet.h
@@ -51,6 +51,7 @@ protected:
// If small, this is # elts allocated consequtively
unsigned NumElements;
+ unsigned NumTombstones;
void *SmallArray[1]; // Must be last ivar.
public:
SmallPtrSetImpl(unsigned SmallSize) {
@@ -82,6 +83,7 @@ public:
// Fill the array with empty markers.
memset(CurArray, -1, CurArraySize*sizeof(void*));
NumElements = 0;
+ NumTombstones = 0;
}
/// insert - This returns true if the pointer was new to the set, false if it