Author: dannyb
Date: Thu Oct 4 16:18:20 2007
New Revision: 42612
URL: http://llvm.org/viewvc/llvm-project?rev=42612&view=rev
Log:
Fix off by one error in iterator
Modified:
llvm/trunk/include/llvm/ADT/SparseBitVector.h
Modified: llvm/trunk/include/llvm/ADT/SparseBitVector.h
URL:
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SparseBitVector.h?rev=42612&r1=42611&r2=42612&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SparseBitVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SparseBitVector.h Thu Oct 4 16:18:20 2007
@@ -390,7 +390,7 @@
// 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;
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits