aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-22 20:32:43 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-22 20:32:43 +0000
commit690b2dbde0ef9eec6b5c950b0c4c7106db37f0a5 (patch)
treef99f0aea61776d6d8eb6c10e37a4e3d511ea9468 /lib/CodeGen/CGClass.cpp
parent71a7605977113c795edd44fcbd2302ad49506653 (diff)
Only trigger the initialize-an-array-via-elementwise-copy/move code
generation when we're dealing with an implicitly-defined copy or move constructor. And, actually set the implicitly-defined bit for implicitly-defined constructors and destructors. Should fix self-host. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140334 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index 59d5ef7859..a831ebda84 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -573,7 +573,8 @@ static void EmitMemberInitializer(CodeGenFunction &CGF,
llvm::Value *ArrayIndexVar = 0;
const ConstantArrayType *Array
= CGF.getContext().getAsConstantArrayType(FieldType);
- if (Array && Constructor->isCopyOrMoveConstructor()) {
+ if (Array && Constructor->isImplicitlyDefined() &&
+ Constructor->isCopyOrMoveConstructor()) {
llvm::Type *SizeTy
= CGF.ConvertType(CGF.getContext().getSizeType());