summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parse/use.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/parse/use.c b/parse/use.c
index 5af8cc7..cc985a7 100644
--- a/parse/use.c
+++ b/parse/use.c
@@ -117,9 +117,9 @@ static Ucon *rducon(FILE *fd, Type *ut)
line = rdint(fd);
id = rdint(fd);
name = unpickle(fd);
- if (rdbool(fd))
- rdtype(fd, &et);
uc = mkucon(line, name, ut, et);
+ if (rdbool(fd))
+ rdtype(fd, &uc->etype);
uc->id = id;
return uc;
}
@@ -593,11 +593,12 @@ static void fixmappings(Stab *st)
*/
int loaduse(FILE *f, Stab *st)
{
+ intptr_t tid;
+ size_t i;
char *pkg;
- Stab *s;
Node *dcl;
+ Stab *s;
Type *t;
- intptr_t tid;
int c;
if (fgetc(f) != 'U')
@@ -635,13 +636,10 @@ int loaduse(FILE *f, Stab *st)
if (t->type == Tyname || t->type == Tygeneric)
if (!gettype(s, t->name))
puttype(s, t->name, t);
- /*
- u = tybase(t);
- if (u->type == Tyunion) {
- for (i = 0; i < u->nmemb; i++)
- putucon(s, u->udecls[i]);
+ if (t->type == Tyunion) {
+ for (i = 0; i < t->nmemb; i++)
+ putucon(s, t->udecls[i]);
}
- */
break;
case EOF:
break;