X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Fentity.c;h=f54ee0664c02b1a077de1eb6a7690a61f9d96cca;hb=603ff7b14c9f34c096ffabbed68ee2ffb48ae158;hp=fc25392749bd6fc33d33cc6fb54e75629a0b982f;hpb=a264fae9c118b272a26d1f636289873d6df14e39;p=libfirm diff --git a/ir/tr/entity.c b/ir/tr/entity.c index fc2539274..f54ee0664 100644 --- a/ir/tr/entity.c +++ b/ir/tr/entity.c @@ -53,6 +53,9 @@ new_entity (type *owner, ident *name, type *type) case tpo_union: { add_union_member (owner, res); } break; + case tpo_array: { + set_array_element_entity(owner, res); + } break; default: assert(0); } @@ -91,7 +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_struct); + get_type_tpop_code(owner) == tpo_struct || + get_type_tpop_code(owner) == tpo_array); /* Yes, array has an entity + -- to select fields! */ } inline ident *