1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Fix iterator so it doesn't sometimes report bits that aren't in the bitmap

llvm-svn: 42039
This commit is contained in:
Daniel Berlin 2007-09-17 18:04:21 +00:00
parent 81b5cda0aa
commit d26deb0a6d

View File

@ -405,6 +405,8 @@ class SparseBitVector {
WordNumber = (NextSetBitNumber % ElementSize) / BITWORD_SIZE; WordNumber = (NextSetBitNumber % ElementSize) / BITWORD_SIZE;
Bits = Iter->word(WordNumber); Bits = Iter->word(WordNumber);
Bits >>= NextSetBitNumber % BITWORD_SIZE; Bits >>= NextSetBitNumber % BITWORD_SIZE;
BitNumber = Iter->index() * ElementSize;
BitNumber += NextSetBitNumber;
} }
} }
} }