projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b095f2
)
Fix off by one error in iterator
author
Daniel Berlin
<dberlin@dberlin.org>
Thu, 4 Oct 2007 21:18:20 +0000
(21:18 +0000)
committer
Daniel Berlin
<dberlin@dberlin.org>
Thu, 4 Oct 2007 21:18:20 +0000
(21:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42612
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/SparseBitVector.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/SparseBitVector.h
b/include/llvm/ADT/SparseBitVector.h
index b02eb3e48059762f89c412ca632ba7b67ce582b7..56db805647e6c7d7eb52df041ade618046dff640 100644
(file)
--- 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;