aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ADT/BitVector.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h
index 2ac4a82e27..8653545134 100644
--- a/include/llvm/ADT/BitVector.h
+++ b/include/llvm/ADT/BitVector.h
@@ -278,7 +278,7 @@ public:
Size = RHS.size();
unsigned RHSWords = NumBitWords(Size);
- if (Size > Capacity * BITS_PER_WORD) {
+ if (Size <= Capacity * BITS_PER_WORD) {
std::copy(RHS.Bits, &RHS.Bits[RHSWords], Bits);
clear_unused_bits();
return *this;