From: Daniel Berlin Date: Wed, 26 Sep 2007 00:11:59 +0000 (+0000) Subject: Fix small bug in operator== for iterators X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9f711252f5d5ef4e05f5277ab462bf7668b53cfd;p=oota-llvm.git Fix small bug in operator== for iterators git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42331 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/SparseBitVector.h b/include/llvm/ADT/SparseBitVector.h index fc7ea021603..a6df0acdc77 100644 --- a/include/llvm/ADT/SparseBitVector.h +++ b/include/llvm/ADT/SparseBitVector.h @@ -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.