diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-16 19:07:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-16 19:07:05 +0000 |
commit | 730f743c013c85d15d902a137aef8f38916af616 (patch) | |
tree | 02fdb86c7599e470a8c4413822dbce1ccfa8d886 /include/llvm/ADT/BitVector.h | |
parent | c221bc73444dadf7ddffb918c654936fc8e6eea0 (diff) |
work around an MSVC2010 bug, PR6504
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/BitVector.h')
-rw-r--r-- | include/llvm/ADT/BitVector.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h index b9f2d83322..3a86b0d343 100644 --- a/include/llvm/ADT/BitVector.h +++ b/include/llvm/ADT/BitVector.h @@ -329,7 +329,8 @@ public: Size = RHS.size(); unsigned RHSWords = NumBitWords(Size); if (Size <= Capacity * BITWORD_SIZE) { - std::copy(RHS.Bits, &RHS.Bits[RHSWords], Bits); + if (Size) + std::copy(RHS.Bits, &RHS.Bits[RHSWords], Bits); clear_unused_bits(); return *this; } |