aboutsummaryrefslogtreecommitdiff
path: root/cc.h
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2024-04-12 00:46:22 -0700
committerMichael Forney <mforney@mforney.org>2024-04-12 00:46:22 -0700
commit7d6efdd8626fd3a654a8f231fc1ddc481352af6a (patch)
treeedc6352a07ffd5e23af2f9ffcbc4c0d0be6c38e9 /cc.h
parentaefce92bd54033c49ba007fde4904dfc6ca740ff (diff)
decl: Add name field to decl struct
Diffstat (limited to 'cc.h')
-rw-r--r--cc.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/cc.h b/cc.h
index 4eb2c63..e69bad0 100644
--- a/cc.h
+++ b/cc.h
@@ -271,6 +271,7 @@ enum builtinkind {
};
struct decl {
+ char *name;
enum declkind kind;
enum linkage linkage;
struct type *type;
@@ -487,7 +488,7 @@ bool gnuattr(struct attr *, enum attrkind);
/* decl */
-struct decl *mkdecl(enum declkind, struct type *, enum typequal, enum linkage);
+struct decl *mkdecl(char *name, enum declkind, struct type *, enum typequal, enum linkage);
bool decl(struct scope *, struct func *);
struct type *typename(struct scope *, enum typequal *);
@@ -501,7 +502,7 @@ void scopeinit(void);
struct scope *mkscope(struct scope *);
struct scope *delscope(struct scope *);
-void scopeputdecl(struct scope *, const char *, struct decl *);
+void scopeputdecl(struct scope *, struct decl *);
struct decl *scopegetdecl(struct scope *, const char *, bool);
void scopeputtag(struct scope *, const char *, struct type *);