diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2007-09-17 18:04:21 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@dberlin.org> | 2007-09-17 18:04:21 +0000 |
commit | 8180cf65a5b9fc41ba402a2d08cf62f70af65aeb (patch) | |
tree | e4c4378843e55c7b269c4d1fb1b04ea556f7f01c | |
parent | e1b50639a860934685dff840e1826b16dbe6a344 (diff) | |
download | external_llvm-8180cf65a5b9fc41ba402a2d08cf62f70af65aeb.zip external_llvm-8180cf65a5b9fc41ba402a2d08cf62f70af65aeb.tar.gz external_llvm-8180cf65a5b9fc41ba402a2d08cf62f70af65aeb.tar.bz2 |
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
-rw-r--r-- | include/llvm/ADT/SparseBitVector.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/ADT/SparseBitVector.h b/include/llvm/ADT/SparseBitVector.h index 6ffc6ed..3455f51 100644 --- a/include/llvm/ADT/SparseBitVector.h +++ b/include/llvm/ADT/SparseBitVector.h @@ -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; } } } |