From ccae61c5da270b0684c4c7d2450d9bf3ff35aac7 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 15 Feb 2007 19:10:34 +0000 Subject: [PATCH] Clear no longer deleting the bits to avoid mallocs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34315 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/BitVector.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h index 03789aa4ffb..6910be04e51 100644 --- a/include/llvm/ADT/BitVector.h +++ b/include/llvm/ADT/BitVector.h @@ -157,11 +157,7 @@ public: /// clear - Clear all bits. void clear() { - if (Capacity > 0) { - delete[] Bits; - Bits = NULL; - Size = Capacity = 0; - } + Size = 0; } /// resize - Grow or shrink the bitvector.