commit 733e9d3977ae9896f94b1f7312b0398ccce19c35 from: rsc date: Wed Apr 21 02:40:59 2004 UTC Fix bug in typedef guys. commit - 79f2723f25b698aabc25d7f7bc6b551b58d3716b commit + 733e9d3977ae9896f94b1f7312b0398ccce19c35 blob - 1ad77714080a5f3be2168055b88ba2216c1cec07 blob + f6a34647e657f399d6d162da94e95dc726af80a5 --- src/cmd/acidtypes/dat.h +++ src/cmd/acidtypes/dat.h @@ -74,6 +74,7 @@ int dwarf2acid(struct Dwarf*, Biobuf*); int stabs2acid(struct Stab*, Biobuf*); Type *newtype(void); +Type *defer(Type*); char *nameof(Type*, int); void freetypes(void); blob - 3c53e849035e6e5c563e1974aed2338f813ae9d0 blob + 05d0b7267975e715a0c9048c5ee92afc9aca1dee --- src/cmd/acidtypes/dwarf.c +++ src/cmd/acidtypes/dwarf.c @@ -113,7 +113,6 @@ ds2acid(Dwarf *d, DwarfSym *s, Biobuf *b, char *fn) t->sub = typebynum(s->attrs.type, 0); break; - case TagConstType: case TagVolatileType: t = xnewtype(Defer, s); @@ -175,6 +174,14 @@ ds2acid(Dwarf *d, DwarfSym *s, Biobuf *b, char *fn) t->n++; } 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; } } blob - 872c38b3a3de6d269c0fefc9ede394baaeeccaa1 blob + c9e8431e052c631dd28e37268435fe4507f604da --- src/cmd/acidtypes/type.c +++ src/cmd/acidtypes/type.c @@ -165,7 +165,7 @@ renumber(TypeList *tl, uint n1) } } -static Type* +Type* defer(Type *t) { Type *u, *oldt;