summaryrefslogtreecommitdiffstats
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
commit7ff09810a888ae6bbfda932cdc76eace3661e10f (patch)
tree330b0712b132f4f0231546c7801c90e16ff3327e
parent4c4b2384480ae83850ad2b59fd5cc7d29c7ea873 (diff)
downloadbcm5719-llvm-7ff09810a888ae6bbfda932cdc76eace3661e10f.tar.gz
bcm5719-llvm-7ff09810a888ae6bbfda932cdc76eace3661e10f.zip
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. llvm-svn: 38481
-rw-r--r--llvm/include/llvm/ADT/BitVector.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/ADT/BitVector.h b/llvm/include/llvm/ADT/BitVector.h
index 5247756618e..243a8102cf8 100644
--- a/llvm/include/llvm/ADT/BitVector.h
+++ b/llvm/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();
OpenPOWER on IntegriCloud