summaryrefslogtreecommitdiff
path: root/parse/specialize.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-06-26 15:56:35 -0700
committerOri Bernstein <ori@eigenstate.org>2015-06-26 15:56:35 -0700
commit3034887c19bb86b0551c854758a9f93ee1395815 (patch)
tree28989ea6d84d543aa75d1d4ed14021bbdd131f1a /parse/specialize.c
parentb05bd318302a3b5043a56479d20261d81bc27012 (diff)
downloadmc-3034887c19bb86b0551c854758a9f93ee1395815.tar.gz
Mark visibility correctly on init funcs.
Diffstat (limited to 'parse/specialize.c')
-rw-r--r--parse/specialize.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse/specialize.c b/parse/specialize.c
index ecf25ec..2500454 100644
--- a/parse/specialize.c
+++ b/parse/specialize.c
@@ -452,6 +452,7 @@ static Node *initdecl(Node *file, Node *name, Type *tyvoidfn)
dcl = mkdecl(Zloc, name, tyvoidfn);
dcl->decl.isconst = 1;
dcl->decl.isinit = 1;
+ dcl->decl.isextern = 1;
putnsdcl(dcl);
}
return dcl;
@@ -495,6 +496,7 @@ void geninit(Node *file)
decl->decl.init = mkexpr(Zloc, Olit, func, NULL);
decl->decl.isconst = 1;
decl->decl.type = tyvoidfn;
+ decl->decl.vis = Vishidden;
lappend(&file->file.stmts, &file->file.nstmts, decl);
}