From 733e9d3977ae9896f94b1f7312b0398ccce19c35 Mon Sep 17 00:00:00 2001 From: rsc Date: Wed, 21 Apr 2004 02:40:59 +0000 Subject: Fix bug in typedef guys. --- src/cmd/acidtypes/dat.h | 1 + src/cmd/acidtypes/dwarf.c | 9 ++++++++- src/cmd/acidtypes/type.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/cmd/acidtypes') diff --git a/src/cmd/acidtypes/dat.h b/src/cmd/acidtypes/dat.h index 1ad77714..f6a34647 100644 --- a/src/cmd/acidtypes/dat.h +++ b/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); diff --git a/src/cmd/acidtypes/dwarf.c b/src/cmd/acidtypes/dwarf.c index 3c53e849..05d0b726 100644 --- a/src/cmd/acidtypes/dwarf.c +++ b/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; } } diff --git a/src/cmd/acidtypes/type.c b/src/cmd/acidtypes/type.c index 872c38b3..c9e8431e 100644 --- a/src/cmd/acidtypes/type.c +++ b/src/cmd/acidtypes/type.c @@ -165,7 +165,7 @@ renumber(TypeList *tl, uint n1) } } -static Type* +Type* defer(Type *t) { Type *u, *oldt; -- cgit v1.2.3