summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2014-03-14 15:40:54 +0000
committerFariborz Jahanian <fjahanian@apple.com>2014-03-14 15:40:54 +0000
commita5a469efbdcbde01a2525f3b1b4b9a0bf8b20575 (patch)
tree258f9da02f7a552c73b716da5ffa12308c6bdd64 /clang/lib
parent8f66a3afe01ce6e3494374dce43d5b0a7e90bbab (diff)
downloadbcm5719-llvm-a5a469efbdcbde01a2525f3b1b4b9a0bf8b20575.tar.gz
bcm5719-llvm-a5a469efbdcbde01a2525f3b1b4b9a0bf8b20575.zip
Objective-C++ IRGen. Due to change to AST for initialization of c++11’s
data members by addition of CXXDefaultInitExpr node to the initializer expression, it has broken treatment of arc code for such initializations. Reviewed by John McCall. // rdar://16299964 llvm-svn: 203935
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index d0380a025d4..1f0dd8535a3 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -571,7 +571,10 @@ void CodeGenFunction::EmitScalarInit(const Expr *init,
EmitStoreThroughLValue(RValue::get(value), lvalue, true);
return;
}
-
+
+ if (const CXXDefaultInitExpr *DIE = dyn_cast<CXXDefaultInitExpr>(init))
+ init = DIE->getExpr();
+
// If we're emitting a value with lifetime, we have to do the
// initialization *before* we leave the cleanup scopes.
if (const ExprWithCleanups *ewc = dyn_cast<ExprWithCleanups>(init)) {
OpenPOWER on IntegriCloud