Commit c59bde18 authored by Matthias Braun's avatar Matthias Braun
Browse files

make get_entity_irg return NULL for non methods as documented in typerep.h

[r25163]
parent 55766c75
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment