X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Fentity.c;h=f54ee0664c02b1a077de1eb6a7690a61f9d96cca;hb=603ff7b14c9f34c096ffabbed68ee2ffb48ae158;hp=7b8255be25138c398aef1928d135a70629e08b07;hpb=a3a4f27fa76972a5aa4773b34ad83796eaf1fcfc;p=libfirm diff --git a/ir/tr/entity.c b/ir/tr/entity.c index 7b8255be2..f54ee0664 100644 --- a/ir/tr/entity.c +++ b/ir/tr/entity.c @@ -51,12 +51,12 @@ new_entity (type *owner, ident *name, type *type) add_struct_member (owner, res); } break; case tpo_union: { - /* not implemented */ + add_union_member (owner, res); } break; - case tpo_method: { - /* not implemented */ + case tpo_array: { + set_array_element_entity(owner, res); } break; - default: ; + default: assert(0); } return res; @@ -94,8 +94,9 @@ inline void /* should this go into type.c? */ assert_legal_owner_of_ent(type *owner) { assert (get_type_tpop_code(owner) == tpo_class || get_type_tpop_code(owner) == tpo_union || - get_type_tpop_code(owner) == tpo_array || - get_type_tpop_code(owner) == tpo_method ); + get_type_tpop_code(owner) == tpo_struct || + get_type_tpop_code(owner) == tpo_array); /* Yes, array has an entity + -- to select fields! */ } inline ident *