scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 989ac22e7b289abcd175369ff890d14c912eb540
parent 7aa7271a9ad01e7368fffa0c5d7426e86a696dcb
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 16 Nov 2014 06:37:05 -0500

Change emitsym2() to emitvar()

emitsym2 had no special meaning, it was only the second part or emitsym,
but emitvar means that it only emits variables (struct fields are
considered variables to).

Diffstat:
Mcc1/code.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cc1/code.c b/cc1/code.c @@ -80,7 +80,7 @@ freetree(Node *np) } static void -emitsym2(Symbol *sym) +emitvar(Symbol *sym) { char c; @@ -130,7 +130,7 @@ void emitsym(Node *np) { putchar('\t'); - (np->b.constant) ? emitconst(np) : emitsym2(np->u.sym); + (np->b.constant) ? emitconst(np) : emitvar(np->u.sym); } static void @@ -142,7 +142,7 @@ emittype(Type *tp) void emitdcl(Symbol *sym) { - emitsym2(sym); + emitvar(sym); putchar('\t'); emittype(sym->type); putchar('\n'); @@ -295,7 +295,7 @@ emitfield(Node *np) child = np->childs[0]; (*child->code)(child); putchar('\t'); - emitsym2(np->u.sym); + emitvar(np->u.sym); } Node *