From 7d6efdd8626fd3a654a8f231fc1ddc481352af6a Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Fri, 12 Apr 2024 00:46:22 -0700 Subject: decl: Add name field to decl struct --- cc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cc.h') 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 *); -- cgit v1.2.3