summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit6d7b6f1ab8a138cbb873db901881b2e24a5a3c0e (patch)
tree97483e8b0232fbfd89064eb968c04a2fcf685ae4 /llvm/lib/Support/SmallPtrSet.cpp
parent836e8f3f3916fd8e00bbd5a34f325130dcff9698 (diff)
downloadbcm5719-llvm-6d7b6f1ab8a138cbb873db901881b2e24a5a3c0e.tar.gz
bcm5719-llvm-6d7b6f1ab8a138cbb873db901881b2e24a5a3c0e.zip
Fix a bug in SmallPtrSet that was causing GVNPRE to enter an infinite loop.
llvm-svn: 37697
Diffstat (limited to 'llvm/lib/Support/SmallPtrSet.cpp')
-rw-r--r--llvm/lib/Support/SmallPtrSet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/SmallPtrSet.cpp b/llvm/lib/Support/SmallPtrSet.cpp
index 56c5e3d18a2..da1a11029e7 100644
--- a/llvm/lib/Support/SmallPtrSet.cpp
+++ b/llvm/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*));
OpenPOWER on IntegriCloud