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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42039 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Berlin 2007-09-17 18:04:21 +00:00
parent e1b50639a8
commit 8180cf65a5

View File

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