Fix bug in typedef guys.

This commit is contained in:
rsc 2004-04-21 02:40:59 +00:00
parent 79f2723f25
commit 733e9d3977
3 changed files with 10 additions and 2 deletions

View file

@ -74,6 +74,7 @@ int dwarf2acid(struct Dwarf*, Biobuf*);
int stabs2acid(struct Stab*, Biobuf*); int stabs2acid(struct Stab*, Biobuf*);
Type *newtype(void); Type *newtype(void);
Type *defer(Type*);
char *nameof(Type*, int); char *nameof(Type*, int);
void freetypes(void); void freetypes(void);

View file

@ -113,7 +113,6 @@ ds2acid(Dwarf *d, DwarfSym *s, Biobuf *b, char *fn)
t->sub = typebynum(s->attrs.type, 0); t->sub = typebynum(s->attrs.type, 0);
break; break;
case TagConstType: case TagConstType:
case TagVolatileType: case TagVolatileType:
t = xnewtype(Defer, s); t = xnewtype(Defer, s);
@ -175,6 +174,14 @@ ds2acid(Dwarf *d, DwarfSym *s, Biobuf *b, char *fn)
t->n++; t->n++;
} }
break; break;
case TagFormalParameter:
case TagVariable:
fprint(2, "var %s %lud\n", s->attrs.name, (ulong)s->attrs.type);
if(s->attrs.name==nil || s->attrs.type==0)
break;
addsymx(fn, s->attrs.name, typebynum(s->attrs.type, 0));
break;
} }
} }

View file

@ -165,7 +165,7 @@ renumber(TypeList *tl, uint n1)
} }
} }
static Type* Type*
defer(Type *t) defer(Type *t)
{ {
Type *u, *oldt; Type *u, *oldt;