summaryrefslogtreecommitdiff
path: root/lib/Support/SmallPtrSet.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-06-22 00:11:18 +0000
committerOwen Anderson <resistor@mac.com>2007-06-22 00:11:18 +0000
commit6394e5e4fd5dd0ef31ae1bb029a206aa057695f2 (patch)
tree510199b417e3472b15c0200978bf4e81f8e6dea2 /lib/Support/SmallPtrSet.cpp
parent61766cae0b635f6a65d4491aa063c5fc12745566 (diff)
downloadllvm-6394e5e4fd5dd0ef31ae1bb029a206aa057695f2.tar.gz
llvm-6394e5e4fd5dd0ef31ae1bb029a206aa057695f2.tar.bz2
llvm-6394e5e4fd5dd0ef31ae1bb029a206aa057695f2.tar.xz
Fix a bug in SmallPtrSet that was causing GVNPRE to enter an infinite loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/SmallPtrSet.cpp')
-rw-r--r--lib/Support/SmallPtrSet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/SmallPtrSet.cpp b/lib/Support/SmallPtrSet.cpp
index 56c5e3d18a..da1a11029e 100644
--- a/lib/Support/SmallPtrSet.cpp
+++ b/lib/Support/SmallPtrSet.cpp
@@ -154,7 +154,7 @@ SmallPtrSetImpl::SmallPtrSetImpl(const SmallPtrSetImpl& that) {
// terminator.
memcpy(CurArray, that.CurArray, sizeof(void*)*(CurArraySize+1));
} else {
- CurArraySize = that.NumElements < 64 ? 128 : that.NumElements*2;
+ CurArraySize = that.NumElements < 64 ? 128 : that.CurArraySize*2;
CurArray = new void*[CurArraySize+1];
memset(CurArray, -1, CurArraySize*sizeof(void*));