Add the label to the block to which it refers.

This commit is contained in:
Bill Currie 2011-01-28 11:41:53 +09:00
parent c158b14286
commit 90a2738459
2 changed files with 4 additions and 0 deletions

View file

@ -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;

View file

@ -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;
}