work around an MSVC2010 bug, PR6504
authorChris Lattner <sabre@nondot.org>
Tue, 16 Mar 2010 19:07:05 +0000 (19:07 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 16 Mar 2010 19:07:05 +0000 (19:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98653 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/BitVector.h

index b9f2d8332263945acc126759799bfec0a4bbbd47..3a86b0d34368e41c152e69a49a7dbaa053d23ce6 100644 (file)
@@ -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;
     }