mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-05 01:31:05 +00:00
BitVector::count() bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34314 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
334df9d83f
commit
7bf26c1d68
@ -101,7 +101,12 @@ public:
|
||||
unsigned count() const {
|
||||
unsigned NumBits = 0;
|
||||
for (unsigned i = 0; i < NumBitWords(size()); ++i)
|
||||
NumBits = CountPopulation_32(Bits[i]);
|
||||
if (sizeof(BitWord) == 4)
|
||||
NumBits += CountPopulation_32(Bits[i]);
|
||||
else if (sizeof(BitWord) == 8)
|
||||
NumBits += CountPopulation_64(Bits[i]);
|
||||
else
|
||||
assert(0 && "Unsupported!")
|
||||
return NumBits;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user