diff options
Diffstat (limited to 'qbe.c')
-rw-r--r-- | qbe.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -473,7 +473,7 @@ mkfunc(struct decl *decl, char *name, struct type *t, struct scope *s) { struct func *f; struct decl *d; - struct value *v, *pv; + struct value *v; f = xmalloc(sizeof(*f)); f->decl = decl; @@ -486,19 +486,17 @@ mkfunc(struct decl *decl, char *name, struct type *t, struct scope *s) /* allocate space for parameters */ f->paramtemps = xreallocarray(NULL, t->u.func.nparam, sizeof *f->paramtemps); - for (d = t->u.func.params, pv = f->paramtemps; d; d = d->next, ++pv) { + for (d = t->u.func.params, v = f->paramtemps; d; d = d->next, ++v) { emittype(d->type); - functemp(f, pv); + functemp(f, v); if(!d->name) continue; if (d->type->value) { - d->value = pv; + d->value = v; } else { - v = pv; funcalloc(f, d); funcstore(f, d->type, QUALNONE, (struct lvalue){d->value}, v); } - scopeputdecl(s, d); } t = mkarraytype(&typechar, QUALCONST, strlen(name) + 1); |