summaryrefslogtreecommitdiff
path: root/parse/export.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2019-02-26 14:07:58 -0800
committerOri Bernstein <ori@markovcorp.com>2019-02-26 14:07:58 -0800
commitd87c0959d85b40fcf60b9c6dd0a2f2111f888b55 (patch)
tree3d9ee97668eda3d4e2656ac069f8575250edc7e2 /parse/export.c
parent02201160614e5f25a7a73d86ed26a1f90fa4f5bb (diff)
downloadmc-d87c0959d85b40fcf60b9c6dd0a2f2111f888b55.tar.gz
Accept that `file` isn't a node.
Shrink node sizes, simplify code a bit.
Diffstat (limited to 'parse/export.c')
-rw-r--r--parse/export.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/parse/export.c b/parse/export.c
index f63f4b6..f907ceb 100644
--- a/parse/export.c
+++ b/parse/export.c
@@ -207,7 +207,6 @@ tagnode(Stab *st, Node *n, int ingeneric, int hidelocal)
case Nuse:
case Nname:
break;
- case Nfile:
case Nnone:
die("Invalid node for type export\n");
break;
@@ -224,17 +223,17 @@ tagexports(int hidelocal)
Node *s;
Type *t;
- st = file->file.globls;
+ st = file.globls;
/* tag the initializers */
- for (i = 0; i < file->file.ninit; i++)
- tagnode(st, file->file.init[i], 0, hidelocal);
- for (i = 0; i < file->file.nfini; i++)
- tagnode(st, file->file.fini[i], 0, hidelocal);
- if (file->file.localinit)
- tagnode(st, file->file.localinit, 0, hidelocal);
- if (file->file.localfini)
- tagnode(st, file->file.localfini, 0, hidelocal);
+ for (i = 0; i < file.ninit; i++)
+ tagnode(st, file.init[i], 0, hidelocal);
+ for (i = 0; i < file.nfini; i++)
+ tagnode(st, file.fini[i], 0, hidelocal);
+ if (file.localinit)
+ tagnode(st, file.localinit, 0, hidelocal);
+ if (file.localfini)
+ tagnode(st, file.localfini, 0, hidelocal);
/* tag the exported nodes */
k = htkeys(st->dcl, &n);