aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-07-10 02:01:16 +0000
committerOwen Anderson <resistor@mac.com>2007-07-10 02:01:16 +0000
commitc5c7f755c8c7f12e1d9190aa3a784fb15cb76241 (patch)
treea9e7f3563eba75d6af55f09d85404c8e8c2a5114 /include
parent81c2a6ecbb3408b1d99f426d194a051f6284a936 (diff)
Evidently my earlier fix did not go far enough. When resizing a zero-sized
BitVector, make sure to set or clear ALL of the bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38481 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/BitVector.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h
index 5247756618..243a8102cf 100644
--- a/include/llvm/ADT/BitVector.h
+++ b/include/llvm/ADT/BitVector.h
@@ -188,7 +188,8 @@ public:
// If we previously had no size, initialize the low word
if (Size == 0)
- Bits[0] = t;
+ for (unsigned i = 0; i < Capacity; ++i)
+ Bits[i] = 0 - (unsigned)t;
Size = N;
clear_unused_bits();