Emit debug info for variables that are used in nested functions

This commit is contained in:
Alexey Prokhin 2011-12-03 23:38:31 +04:00
parent cedb4c0e68
commit b8721a8515
7 changed files with 103 additions and 25 deletions

View file

@ -729,6 +729,15 @@ void DtoDefineFunction(FuncDeclaration* fd)
#endif
}
// give the 'nestArg' storage
if (f->fty.arg_nest)
{
LLValue *nestArg = irfunction->nestArg;
LLValue *val = DtoRawAlloca(nestArg->getType(), 0, "nestedFrame");
DtoStore(nestArg, val);
irfunction->nestArg = val;
}
// give arguments storage
// and debug info
if (fd->parameters)