diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-05-24 12:43:03 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-05-24 12:43:03 -0700 |
commit | cc043496045c5588cc969b5a75af60b084ecc69a (patch) | |
tree | 358c9e1c83122aa1e5f277f9b6d42f0469b145ae /sys/cmd/cc/cc.c | |
parent | af0c1d5ac3960776a4a485ca587744464630e634 (diff) |
feat: added prototype of type info
Diffstat (limited to 'sys/cmd/cc/cc.c')
-rw-r--r-- | sys/cmd/cc/cc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/cmd/cc/cc.c b/sys/cmd/cc/cc.c index 02ff773..24d8e45 100644 --- a/sys/cmd/cc/cc.c +++ b/sys/cmd/cc/cc.c @@ -194,6 +194,15 @@ init(void) C.inc.dir[C.inc.len++] = "."; C.outfile = nil; + + /* type info */ + C.type.len = arrlen(basetypes); + C.type.cap = 100 + arrlen(basetypes); + C.type.info = calloc(C.type.cap, sizeof(*C.type.info)); + + memcpy(C.type.info, basetypes, C.type.len * sizeof(*C.type.info)); + for (i = 0; i < arrlen(basetypes); i++) + intern(&C.type.info[i].ident); } void |