aboutsummaryrefslogtreecommitdiff
path: root/decl.h
diff options
context:
space:
mode:
Diffstat (limited to 'decl.h')
-rw-r--r--decl.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/decl.h b/decl.h
new file mode 100644
index 0000000..4b3ef20
--- /dev/null
+++ b/decl.h
@@ -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);