Fix small bug in operator== for iterators
authorDaniel Berlin <dberlin@dberlin.org>
Wed, 26 Sep 2007 00:11:59 +0000 (00:11 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Wed, 26 Sep 2007 00:11:59 +0000 (00:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42331 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/SparseBitVector.h

index fc7ea021603bb1311f5570952972bf546fe1f540..a6df0acdc77f65ba6cd784b3d66a58e4f17e5835 100644 (file)
@@ -441,7 +441,7 @@ class SparseBitVector {
 
     bool operator==(const SparseBitVectorIterator &RHS) const {
       // If they are both at the end, ignore the rest of the fields.
-      if (AtEnd == RHS.AtEnd)
+      if (AtEnd && RHS.AtEnd)
         return true;
       // Otherwise they are the same if they have the same bit number and
       // bitmap.