summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commiteb4089ad01a2570dfcdd02efb9071adf1f1b49e9 (patch)
treef682fc54173ce7c7a8ca1e2acfebbe5952b61413 /clang/lib/CodeGen
parent0e4fcb8e3b9099051df0ec29aa8ccec873cb1c95 (diff)
downloadbcm5719-llvm-eb4089ad01a2570dfcdd02efb9071adf1f1b49e9.tar.gz
bcm5719-llvm-eb4089ad01a2570dfcdd02efb9071adf1f1b49e9.zip
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. llvm-svn: 140334
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index 59d5ef78599..a831ebda84b 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/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());
OpenPOWER on IntegriCloud