diff options
Diffstat (limited to 'qbe.c')
-rw-r--r-- | qbe.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -71,6 +71,15 @@ struct switchcase { struct value *body; }; +struct function { + char *name; + struct declaration *namedecl; + struct type *type; + struct block *start, *end; + struct hashtable *gotos; + uint64_t lastid; +}; + struct representation i8 = {'w', 'b'}; struct representation i16 = {'w', 'h'}; struct representation i32 = {'w', 'w'}; @@ -397,6 +406,12 @@ mkfunc(char *name, struct type *t, struct scope *s) return f; } +struct type * +functype(struct function *f) +{ + return f->type; +} + void funclabel(struct function *f, struct value *v) { |