[llvm-commits] CVS: llvm/include/llvm/ADT/BitVector.h

Evan Cheng evan.cheng at apple.com
Thu Feb 15 11:10:53 PST 2007



Changes in directory llvm/include/llvm/ADT:

BitVector.h updated: 1.7 -> 1.8
---
Log message:

Clear no longer deleting the bits to avoid mallocs.

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

 BitVector.h |    6 +-----
 1 files changed, 1 insertion(+), 5 deletions(-)


Index: llvm/include/llvm/ADT/BitVector.h
diff -u llvm/include/llvm/ADT/BitVector.h:1.7 llvm/include/llvm/ADT/BitVector.h:1.8
--- llvm/include/llvm/ADT/BitVector.h:1.7	Thu Feb 15 13:09:36 2007
+++ llvm/include/llvm/ADT/BitVector.h	Thu Feb 15 13:10:34 2007
@@ -157,11 +157,7 @@
 
   /// clear - Clear all bits.
   void clear() {
-    if (Capacity > 0) {
-      delete[] Bits;
-      Bits = NULL;
-      Size = Capacity = 0;
-    }
+    Size = 0;
   }
 
   /// resize - Grow or shrink the bitvector.






More information about the llvm-commits mailing list