When resizing a BitVector with size 0, be sure to clear the low word before using it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38476 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson 2007-07-09 23:39:39 +00:00
parent dfa2435784
commit 0c81450a0c

View File

@ -185,6 +185,11 @@ public:
grow(N);
init_words(&Bits[OldCapacity], (Capacity-OldCapacity), t);
}
// If we previously had no size, initialize the low word
if (Size == 0)
Bits[0] = t;
Size = N;
clear_unused_bits();
}