From fddc26cc641412f7ed4245cb05d11343dc0e0f12 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 24 Dec 2009 23:33:34 +0000 Subject: Make copy constructor elimination work in more cases; the case in question here affects clang-on-clang. llvm-svn: 92151 --- clang/lib/CodeGen/CGCXX.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/CodeGen/CGCXX.cpp') diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp index 7b9ee20abaf..b0f23af8200 100644 --- a/clang/lib/CodeGen/CGCXX.cpp +++ b/clang/lib/CodeGen/CGCXX.cpp @@ -590,6 +590,9 @@ CodeGenFunction::EmitCXXConstructExpr(llvm::Value *Dest, Arg = ICE->getSubExpr(); } + if (const CXXFunctionalCastExpr *FCE = dyn_cast(Arg)) + Arg = FCE->getSubExpr(); + if (const CXXBindTemporaryExpr *BindExpr = dyn_cast(Arg)) Arg = BindExpr->getSubExpr(); -- cgit v1.2.3