From 90a27384593a90c4670e843010b49785f88de24e Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 28 Jan 2011 11:41:53 +0900 Subject: [PATCH] Add the label to the block to which it refers. --- tools/qfcc/include/statements.h | 2 ++ tools/qfcc/source/statements.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/qfcc/include/statements.h b/tools/qfcc/include/statements.h index 84003481d..01c9635d7 100644 --- a/tools/qfcc/include/statements.h +++ b/tools/qfcc/include/statements.h @@ -61,7 +61,9 @@ typedef struct statement_s { typedef struct sblock_s { struct sblock_s *next; struct reloc_s *relocs; + struct ex_label_s *labels; int offset; ///< offset of first statement of block + int reachable; statement_t *statements; statement_t **tail; } sblock_t; diff --git a/tools/qfcc/source/statements.c b/tools/qfcc/source/statements.c index 57c175d44..5a89e5fe4 100644 --- a/tools/qfcc/source/statements.c +++ b/tools/qfcc/source/statements.c @@ -665,6 +665,8 @@ statement_label (sblock_t *sblock, expr_t *e) sblock = sblock->next; } e->e.label.dest = sblock; + e->e.label.next = sblock->labels; + sblock->labels = &e->e.label; return sblock; }