X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Fentity_t.h;h=e8b6d9d90a57ffacb3065d8276d741c931b42f2d;hb=274626e2d58cfa247b88ee05adaca8906b025d93;hp=fe33ade652e57812d8bc766fe11ae59c34d64534;hpb=f7ff9494d0f76325b53f09452c6491aaad4a6d06;p=libfirm diff --git a/ir/tr/entity_t.h b/ir/tr/entity_t.h index fe33ade65..e8b6d9d90 100644 --- a/ir/tr/entity_t.h +++ b/ir/tr/entity_t.h @@ -117,6 +117,7 @@ typedef enum ir_entity_kind { IR_ENTITY_COMPOUND_MEMBER, IR_ENTITY_PARAMETER, IR_ENTITY_LABEL, + IR_ENTITY_UNKNOWN, } ir_entity_kind; /** @@ -180,9 +181,9 @@ struct ir_entity { }; /** Initialize the entity module. */ -void ir_init_entity(void); +void ir_init_entity(ir_prog *irp); /** Cleanup entity module */ -void ir_finish_entity(void); +void ir_finish_entity(ir_prog *irp); /** * Creates an entity corresponding to the start address of a basic block @@ -195,6 +196,8 @@ ir_entity *new_label_entity(ir_label_t label); */ ir_entity *new_d_label_entity(ir_label_t label, dbg_info *dbgi); +void set_entity_irg(ir_entity *ent, ir_graph *irg); + /* ----------------------- inline functions ------------------------ */ static inline int _is_entity(const void *thing) { @@ -356,7 +359,7 @@ static inline void _set_entity_link(ir_entity *ent, void *l) static inline ir_graph *_get_entity_irg(const ir_entity *ent) { assert(ent && ent->kind == k_entity); - if (!is_Method_type(ent->type) || ent == unknown_entity) { + if (!is_Method_type(ent->type) || is_unknown_entity(ent)) { return NULL; }