[llvm-commits] [llvm] r42039 - /llvm/trunk/include/llvm/ADT/SparseBitVector.h
Daniel Berlin
dberlin at dberlin.org
Mon Sep 17 11:04:21 PDT 2007
Author: dannyb
Date: Mon Sep 17 13:04:21 2007
New Revision: 42039
URL: http://llvm.org/viewvc/llvm-project?rev=42039&view=rev
Log:
Fix iterator so it doesn't sometimes report bits that aren't in the bitmap
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=42039&r1=42038&r2=42039&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SparseBitVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SparseBitVector.h Mon Sep 17 13:04:21 2007
@@ -405,6 +405,8 @@
WordNumber = (NextSetBitNumber % ElementSize) / BITWORD_SIZE;
Bits = Iter->word(WordNumber);
Bits >>= NextSetBitNumber % BITWORD_SIZE;
+ BitNumber = Iter->index() * ElementSize;
+ BitNumber += NextSetBitNumber;
}
}
}
More information about the llvm-commits
mailing list