From: Götz Lindenmaier Date: Thu, 22 Jan 2004 15:13:40 +0000 (+0000) Subject: check peculiarity / irg X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=aa41e92ce189af25ad34ef3240575cf076e99b4d;p=libfirm check peculiarity / irg [r2343] --- diff --git a/ir/tr/trvrfy.c b/ir/tr/trvrfy.c index 89b6a7897..30d3ceafe 100644 --- a/ir/tr/trvrfy.c +++ b/ir/tr/trvrfy.c @@ -147,6 +147,15 @@ static int check_entity(entity *ent) { assert(0 && "Contants placed on wrong IRG"); return error_const_on_wrong_irg; } + + if ((get_entity_peculiarity(ent) == peculiarity_existent) && + (get_entity_visibility(ent) != visibility_external_allocated) && + (is_method_type(get_entity_type(ent))) && + (!get_entity_irg(ent) || !(is_ir_graph(get_entity_irg(ent))))) { + assert(0 && "Method ents with pec_exist must have an irg"); + return error_existent_entity_without_irg; + } + return 0; }