diff options
Diffstat (limited to 'decl.h')
-rw-r--r-- | decl.h | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -0,0 +1,37 @@ +enum declarationkind { + DECLTYPE, + DECLOBJECT, + DECLFUNC, + DECLCONST, + DECLBUILTIN, +}; + +enum linkage { + LINKNONE, + LINKINTERN, + LINKEXTERN, +}; + +struct declaration { + enum declarationkind kind; + enum linkage linkage; + struct type *type; + struct value *value; + struct list link; + int align; /* may be more strict than type requires */ + _Bool tentative, defined; +}; + +struct scope; +struct function; + +extern struct declaration builtinvastart, builtinvaend, builtinoffsetof; + +struct declaration *mkdecl(enum declarationkind, struct type *, enum linkage); +_Bool decl(struct scope *, struct function *); +struct type *typename(struct scope *); + +struct expression; +struct declaration *stringdecl(struct expression *); + +void emittentativedefns(void); |