ref: 2e59984d40758e4d4a04f1e21c223a3361f21b0e
parent: 42aa3beda454c3476f337a2ffee6a91545c4ab59
author: Roberto E. Vargas Caballero <[email protected]>
date: Fri Aug 12 07:06:51 EDT 2016
[cc2-qbe] move the call to setlabel() to cgen() Cgen() is the function called to generate the asm code for a C statement, and it means that it will receive the node which has the label.
--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
@@ -241,7 +241,6 @@
char *tbl;
Symbol *true, *false;
- setlabel(np->label);
tp = &np->type;
switch (np->op) {
@@ -323,6 +322,7 @@
Node n, *aux, *next, *ifyes, *ifno;
Symbol *label1, *label2;
+ setlabel(np->label);
switch (np->op) {
case OJMP:
ifyes = label2node(np->u.sym);