plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 733e9d3977ae9896f94b1f7312b0398ccce19c35
parent 79f2723f25b698aabc25d7f7bc6b551b58d3716b
Author: rsc <devnull@localhost>
Date:   Wed, 21 Apr 2004 02:40:59 +0000

Fix bug in typedef guys.

Diffstat:
Msrc/cmd/acidtypes/dat.h | 1+
Msrc/cmd/acidtypes/dwarf.c | 9++++++++-
Msrc/cmd/acidtypes/type.c | 2+-
3 files changed, 10 insertions(+), 2 deletions(-)

diff --git 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 @@ -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 @@ -165,7 +165,7 @@ renumber(TypeList *tl, uint n1) } } -static Type* +Type* defer(Type *t) { Type *u, *oldt;