aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ADT/BitVector.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h
index bbbb179ee4..0677b5449d 100644
--- a/include/llvm/ADT/BitVector.h
+++ b/include/llvm/ADT/BitVector.h
@@ -235,7 +235,9 @@ public:
// 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;