Evaluate the initializer for automatic variables.

llvm-svn: 39771
This commit is contained in:
Chris Lattner 2007-07-12 00:39:48 +00:00
parent 79c57590a3
commit 07eb733ef8
1 changed files with 3 additions and 1 deletions

View File

@ -84,7 +84,9 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const BlockVarDecl &D) {
assert(DMEntry == 0 && "Decl already exists in localdeclmap!");
DMEntry = DeclPtr;
// FIXME: Evaluate initializer.
// If this local has an initializer, emit it now.
if (const Expr *Init = D.getInit())
EmitStoreThroughLValue(EmitExpr(Init), LValue::MakeAddr(DeclPtr), Ty);
}
/// Emit an alloca for the specified parameter and set up LocalDeclMap.