diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-08-24 05:35:26 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-08-24 05:35:26 +0000 |
| commit | 2da04b332264ae6cf72f7c87beee8a0f9d0a7eb0 (patch) | |
| tree | f54c86e91c960144b458ed79c0f23082e0191bde /clang/CodeGen/CGDecl.cpp | |
| parent | 504dc0aaedb5b93ba64db03eec2a72eab3a8c7b2 (diff) | |
| download | bcm5719-llvm-2da04b332264ae6cf72f7c87beee8a0f9d0a7eb0.tar.gz bcm5719-llvm-2da04b332264ae6cf72f7c87beee8a0f9d0a7eb0.zip | |
completely refactor codegen of scalar expressions out into its own CGExprScalar.cpp file.
This patch temporarily breaks compound assignment operators, but greatly simplifies many
things.
llvm-svn: 41355
Diffstat (limited to 'clang/CodeGen/CGDecl.cpp')
| -rw-r--r-- | clang/CodeGen/CGDecl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/CodeGen/CGDecl.cpp b/clang/CodeGen/CGDecl.cpp index 63b9d6f881c..8489cbabd89 100644 --- a/clang/CodeGen/CGDecl.cpp +++ b/clang/CodeGen/CGDecl.cpp @@ -84,8 +84,10 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const BlockVarDecl &D) { DMEntry = DeclPtr; // If this local has an initializer, emit it now. - if (const Expr *Init = D.getInit()) - EmitStoreThroughLValue(EmitExpr(Init), LValue::MakeAddr(DeclPtr), Ty); + if (const Expr *Init = D.getInit()) { + // FIXME: This could be much better for aggregates / complex. + EmitStoreThroughLValue(EmitAnyExpr(Init), LValue::MakeAddr(DeclPtr), Ty); + } } /// Emit an alloca for the specified parameter and set up LocalDeclMap. |

