[llvm-commits] CVS: llvm/lib/Support/SmallPtrSet.cpp

Owen Anderson resistor at mac.com
Thu Jun 21 17:11:40 PDT 2007



Changes in directory llvm/lib/Support:

SmallPtrSet.cpp updated: 1.7 -> 1.8
---
Log message:

Fix a bug in SmallPtrSet that was causing GVNPRE to enter an infinite loop.


---
Diffs of the changes:  (+1 -1)

 SmallPtrSet.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Support/SmallPtrSet.cpp
diff -u llvm/lib/Support/SmallPtrSet.cpp:1.7 llvm/lib/Support/SmallPtrSet.cpp:1.8
--- llvm/lib/Support/SmallPtrSet.cpp:1.7	Thu Jun 21 18:23:32 2007
+++ llvm/lib/Support/SmallPtrSet.cpp	Thu Jun 21 19:11:18 2007
@@ -154,7 +154,7 @@
     // 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*));
     






More information about the llvm-commits mailing list