commit 0b8f18a02b36d3cb05b703f9dac7953924942a49
parent 66915c0956d505bf60140ff48021c0725edfa02c
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 13 Aug 2015 09:53:55 +0200
Emit name of variables in declarations
This name is needed for global variables and in the case
of locals can be useful for debugging
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/cc1/code.c b/cc1/code.c
@@ -266,6 +266,8 @@ emitdcl(unsigned op, void *arg)
emitvar(sym);
putchar('\t');
emitletter(sym->type);
+ if (sym->name)
+ printf("\t%s", sym->name);
if (op != OFUN)
putchar('\n');
sym->flags |= ISEMITTED;