Give struct types a name.

Use the struct/union's name (minus "tag ") for the type name.
This commit is contained in:
Bill Currie 2011-02-03 10:52:12 +09:00
parent d12cdca758
commit 22ccd41164

View file

@ -82,9 +82,11 @@ find_tag (ty_type_e ty, symbol_t *tag, type_t *type)
if (sym->type->ty == ty)
return sym;
}
if (!type)
type = new_type ();
sym = new_symbol (tag_name);
if (!type) {
type = new_type ();
type->name = sym->name + 4;
}
sym->type = type;
sym->type->type = ev_invalid;
sym->type->ty = ty;