Commit 0ef534e6 authored by Matthias Braun's avatar Matthias Braun
Browse files

irnode: Use set_op_get_{type_attr|entity_func}() instead of custom function

parent c19a2358
......@@ -958,29 +958,19 @@ const char *get_cond_jmp_predicate_name(cond_jmp_predicate pred)
#undef X
}
static void register_get_type_func(ir_op *op, get_type_attr_func func)
{
op->ops.get_type_attr = func;
}
static void register_get_entity_func(ir_op *op, get_entity_attr_func func)
{
op->ops.get_entity_attr = func;
}
void ir_register_getter_ops(void)
{
register_get_type_func(op_Align, get_Align_type);
register_get_type_func(op_Builtin, get_Builtin_type);
register_get_type_func(op_Call, get_Call_type);
register_get_type_func(op_CopyB, get_CopyB_type);
register_get_type_func(op_Sel, get_Sel_type);
register_get_type_func(op_Size, get_Size_type);
register_get_entity_func(op_Address, get_Address_entity);
register_get_entity_func(op_Block, get_Block_entity);
register_get_entity_func(op_Member, get_Member_entity);
register_get_entity_func(op_Offset, get_Offset_entity);
set_op_get_type_attr(op_Align, get_Align_type);
set_op_get_type_attr(op_Builtin, get_Builtin_type);
set_op_get_type_attr(op_Call, get_Call_type);
set_op_get_type_attr(op_CopyB, get_CopyB_type);
set_op_get_type_attr(op_Sel, get_Sel_type);
set_op_get_type_attr(op_Size, get_Size_type);
set_op_get_entity_attr(op_Address, get_Address_entity);
set_op_get_entity_attr(op_Block, get_Block_entity);
set_op_get_entity_attr(op_Member, get_Member_entity);
set_op_get_entity_attr(op_Offset, get_Offset_entity);
}
void (set_irn_dbg_info)(ir_node *n, dbg_info *db)
......
Markdown is supported
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