forked from OSchip/llvm-project
When resizing a BitVector with size 0, be sure to clear the low word before using it.
llvm-svn: 38476
This commit is contained in:
parent
effc7a7d16
commit
c3bd1db42d
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue