summaryrefslogtreecommitdiff
path: root/parse/use.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-01-17 13:53:44 -0800
committerOri Bernstein <ori@markovcorp.com>2018-01-17 13:53:44 -0800
commitc7ad247d35a719539fc4df4e7a78d07e77a6f538 (patch)
tree81b9ebd0c54b366101ed98f50c4f86c71ea24f77 /parse/use.c
parentb5c63138b4f40766dacc40e8ce91d44abdbb3b0e (diff)
downloadmc-c7ad247d35a719539fc4df4e7a78d07e77a6f538.tar.gz
Infer after generating init functions.
Pull out the usefile loading, so we can call it separately from inference. Then shuffle the infer() call to after we generate init().
Diffstat (limited to 'parse/use.c')
-rw-r--r--parse/use.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/parse/use.c b/parse/use.c
index 906e59b..cf9ba90 100644
--- a/parse/use.c
+++ b/parse/use.c
@@ -1189,6 +1189,15 @@ readuse(Node *use, Stab *st, Vis vis)
free(p);
}
+void
+loaduses(void)
+{
+ size_t i;
+
+ for (i = 0; i < file->file.nuses; i++)
+ readuse(file->file.uses[i], file->file.globls, Visintern);
+}
+
/* Usefile format:
* U<pkgname>
* L<liblist>