aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2023-09-05 13:48:56 +0200
committerlemon <lsof@mailbox.org>2023-09-05 13:48:56 +0200
commit5640e24ee066d1e8ed46ea4f53142e84d19399ca (patch)
tree3b4db62636f3810e67bbc2af3b95eebf1e72b7a6
parent47f1eac08e3112bc9eb502332831ef629e2e2fdf (diff)
move definition of struct label
-rw-r--r--c.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/c.c b/c.c
index 56f3366..92075a3 100644
--- a/c.c
+++ b/c.c
@@ -15,16 +15,6 @@ struct comp {
pmap_of(struct label) labels;
};
-struct label {
- struct span usespan;
- struct block *blk;
- /* if usespan.ex.len == 0, this label is resolved and blk is the block that
- * the label starts, otherwise the label is unresolved and blk is the head
- * of a linked list of relocations, the next list entry is in blk->s1, etc,
- * terminated by NULL */
-
-};
-
/** Parsing helper functions **/
#define peek(Cm,Tk) lexpeek(&(Cm)->lx,Tk)
#define lex(Cm,Tk) lex(&(Cm)->lx,Tk)
@@ -2867,6 +2857,15 @@ static void block(struct comp *cm, struct function *fn);
static bool stmt(struct comp *cm, struct function *fn);
static void localdecl(struct comp *cm, struct function *fn, bool forinit);
+struct label {
+ struct span usespan;
+ struct block *blk;
+ /* if usespan.ex.len == 0, this label is resolved and blk is the block that
+ * the label starts, otherwise the label is unresolved and blk is the head
+ * of a linked list of relocations, the next list entry is in blk->s1, etc,
+ * terminated by NULL */
+};
+
static void
deflabel(struct comp *cm, struct function *fn, const struct span *span, const char *name)
{