summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-12-24 23:33:34 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-12-24 23:33:34 +0000
commitfddc26cc641412f7ed4245cb05d11343dc0e0f12 (patch)
treea6cdc38c5e52ec4d66aa3833da0a367dfb8c74e8 /clang/lib/CodeGen/CGCXX.cpp
parentdd5044ac55237e68e5de30804fa8ca7548a9bcde (diff)
downloadbcm5719-llvm-fddc26cc641412f7ed4245cb05d11343dc0e0f12.tar.gz
bcm5719-llvm-fddc26cc641412f7ed4245cb05d11343dc0e0f12.zip
Make copy constructor elimination work in more cases; the case in question
here affects clang-on-clang. llvm-svn: 92151
Diffstat (limited to 'clang/lib/CodeGen/CGCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGCXX.cpp3
1 files changed, 3 insertions, 0 deletions
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<CXXFunctionalCastExpr>(Arg))
+ Arg = FCE->getSubExpr();
+
if (const CXXBindTemporaryExpr *BindExpr =
dyn_cast<CXXBindTemporaryExpr>(Arg))
Arg = BindExpr->getSubExpr();
OpenPOWER on IntegriCloud