Allocate space for function parameters.

This commit is contained in:
Bill Currie 2011-01-25 15:43:57 +09:00
parent f45919df09
commit 849d013f5e
1 changed files with 2 additions and 0 deletions

View File

@ -428,6 +428,7 @@ build_scope (symbol_t *fsym, symtab_t *parent)
if (fsym->type->t.func.num_params < 0) {
args = new_symbol_type (".args", &type_va_list);
initialize_def (args, args->type, 0, symtab->space, st_local);
symtab_addsymbol (symtab, args);
}
@ -437,6 +438,7 @@ build_scope (symbol_t *fsym, symtab_t *parent)
if (!p->type)
continue; // non-param selector
param = new_symbol_type (p->name, p->type);
initialize_def (param, param->type, 0, symtab->space, st_local);
symtab_addsymbol (symtab, param);
i++;
}