From: Matthias Braun Date: Tue, 13 Jan 2009 12:03:14 +0000 (+0000) Subject: make get_entity_irg return NULL for non methods as documented in typerep.h X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=c59bde182e22fdc54b91e7c7a5422178ca2665b2;p=libfirm make get_entity_irg return NULL for non methods as documented in typerep.h [r25163] --- diff --git a/ir/tr/entity_t.h b/ir/tr/entity_t.h index cc5e82fcf..92aee1212 100644 --- a/ir/tr/entity_t.h +++ b/ir/tr/entity_t.h @@ -420,7 +420,10 @@ static inline ir_graph * _get_entity_irg(const ir_entity *ent) { ir_graph *irg; assert(ent && ent->kind == k_entity); - assert(ent == unknown_entity || is_Method_type(ent->type)); + if (!is_Method_type(ent->type) || ent == unknown_entity) { + return NULL; + } + irg = ent->attr.mtd_attr.irg; if (irg != NULL && !get_visit_pseudo_irgs() && is_pseudo_ir_graph(irg)) return NULL;