aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/SparseBitVector.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/SparseBitVector.h b/include/llvm/ADT/SparseBitVector.h
index b02eb3e..56db805 100644
--- a/include/llvm/ADT/SparseBitVector.h
+++ b/include/llvm/ADT/SparseBitVector.h
@@ -390,7 +390,7 @@ class SparseBitVector {
// See if we ran out of Bits in this word.
if (!Bits) {
- int NextSetBitNumber = Iter->find_next(BitNumber % ElementSize) ;
+ int NextSetBitNumber = Iter->find_next((BitNumber - 1) % ElementSize) ;
// If we ran out of set bits in this element, move to next element.
if (NextSetBitNumber == -1 || (BitNumber % ElementSize == 0)) {
++Iter;