summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/BitVector.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-15 19:16:21 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-15 19:16:21 +0000
commit638417f7887303b8dcf75043b39182de4c96db55 (patch)
tree0da664537beeb622d82595ac3aa8bbadf52a510f /include/llvm/ADT/BitVector.h
parentc761df18ae4979a8f2a0d3c5c35cda41db2a3f0b (diff)
downloadllvm-638417f7887303b8dcf75043b39182de4c96db55.tar.gz
llvm-638417f7887303b8dcf75043b39182de4c96db55.tar.bz2
llvm-638417f7887303b8dcf75043b39182de4c96db55.tar.xz
operator== returns false when two bitvectors have different sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/BitVector.h')
-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;