diff options
author | Anders Carlsson <andersca@mac.com> | 2009-08-22 22:30:33 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-08-22 22:30:33 +0000 |
commit | 92f5822df6a0d7571df44b5d279ed4f017fbb0e6 (patch) | |
tree | a00d4c3c4a8f201fc5d4f0048bdf7bcbc5159e2e /lib/CodeGen/CGCXX.cpp | |
parent | 9ec22a37a22218c4a73430c614d3540b076baa14 (diff) |
Add a -fno-elide-constructors option to clang-cc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGCXX.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index ebe61127b6..7a2c410fe8 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -512,7 +512,7 @@ CodeGenFunction::EmitCXXConstructExpr(llvm::Value *Dest, // Code gen optimization to eliminate copy constructor and return // its first argument instead. - if (E->isElidable()) { + if (getContext().getLangOptions().ElideConstructors && E->isElidable()) { CXXConstructExpr::const_arg_iterator i = E->arg_begin(); EmitAggExpr((*i), Dest, false); return; |