diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-24 23:33:34 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-24 23:33:34 +0000 |
commit | cb48f8a60ad26b56d299cca9a57f8ea683d8a909 (patch) | |
tree | 1b7483d8242c2a2a4cd8deda113476b76cdd7736 /lib/CodeGen/CGCXX.cpp | |
parent | 6be112049b24ffaa8508646aa695834b4b5ca2b2 (diff) |
Make copy constructor elimination work in more cases; the case in question
here affects clang-on-clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGCXX.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index 7b9ee20aba..b0f23af820 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/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(); |