aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-16 19:07:05 +0000
committerChris Lattner <sabre@nondot.org>2010-03-16 19:07:05 +0000
commit730f743c013c85d15d902a137aef8f38916af616 (patch)
tree02fdb86c7599e470a8c4413822dbce1ccfa8d886 /include
parentc221bc73444dadf7ddffb918c654936fc8e6eea0 (diff)
downloadexternal_llvm-730f743c013c85d15d902a137aef8f38916af616.zip
external_llvm-730f743c013c85d15d902a137aef8f38916af616.tar.gz
external_llvm-730f743c013c85d15d902a137aef8f38916af616.tar.bz2
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')
-rw-r--r--include/llvm/ADT/BitVector.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h
index b9f2d833..3a86b0d 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;
}