[llvm-commits] CVS: llvm/include/llvm/ADT/BitVector.h
Evan Cheng
evan.cheng at apple.com
Thu Feb 15 11:16:38 PST 2007
Changes in directory llvm/include/llvm/ADT:
BitVector.h updated: 1.9 -> 1.10
---
Log message:
operator== returns false when two bitvectors have different sizes.
---
Diffs of the changes: (+3 -1)
BitVector.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/include/llvm/ADT/BitVector.h
diff -u llvm/include/llvm/ADT/BitVector.h:1.9 llvm/include/llvm/ADT/BitVector.h:1.10
--- llvm/include/llvm/ADT/BitVector.h:1.9 Thu Feb 15 13:12:39 2007
+++ llvm/include/llvm/ADT/BitVector.h Thu Feb 15 13:16:21 2007
@@ -235,7 +235,9 @@
// Comparison operators.
bool operator==(const BitVector &RHS) const {
- assert(Size == RHS.Size && "Illegal operation!");
+ if (Size != RHS.Size)
+ return false;
+
for (unsigned i = 0; i < NumBitWords(size()); ++i)
if (Bits[i] != RHS.Bits[i])
return false;
More information about the llvm-commits
mailing list