summaryrefslogtreecommitdiff
path: root/parse/stab.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-10-22 20:13:02 -0700
committerOri Bernstein <ori@eigenstate.org>2017-10-23 00:57:46 -0700
commit3ff4453f5f5898a7b44d47218945d4385c2f5c32 (patch)
tree51fca97ae14f60d528742fd455673536382c99c0 /parse/stab.c
parent26ac18e94d9f64f5153c51cf6d6151367ea0dfd7 (diff)
downloadmc-3ff4453f5f5898a7b44d47218945d4385c2f5c32.tar.gz
Propagate hiddenness properly across usefile merges.
Diffstat (limited to 'parse/stab.c')
-rw-r--r--parse/stab.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/parse/stab.c b/parse/stab.c
index c24b4a4..023e9f7 100644
--- a/parse/stab.c
+++ b/parse/stab.c
@@ -505,12 +505,18 @@ putucon(Stab *st, Ucon *uc)
static int
mergetrait(Trait *old, Trait *new)
{
+ int hidden;
+
+ hidden = old->ishidden && new->ishidden;
if (old->isproto && !new->isproto)
*old = *new;
else if (new->isproto && !old->isproto)
*new = *old;
else if (!new->isimport && !old->isimport)
- return new->vis == Vishidden || old->vis == Vishidden;
+ if (new->vis == Vishidden || old->vis == Vishidden)
+ return 0;
+ new->ishidden = hidden;
+ old->ishidden = hidden;
return 1;
}