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

make get_op_ops result non-const

so external users can set their own opcode functions.
parent 6de33165
......@@ -307,7 +307,7 @@ FIRM_API void ir_op_set_fragile_indices(ir_op *op, int pn_x_regular,
int pn_x_except);
/** Returns the ir_op_ops of an ir_op. */
FIRM_API const ir_op_ops *get_op_ops(const ir_op *op);
FIRM_API ir_op_ops *get_op_ops(ir_op *op);
/** @} */
......
......@@ -70,16 +70,13 @@ arch_env_t *arch_env_begin_codegeneration(const arch_isa_if_t *isa_if,
*/
static const arch_irn_ops_t *get_irn_ops(const ir_node *irn)
{
const ir_op *ops;
const arch_irn_ops_t *be_ops;
if (is_Proj(irn)) {
irn = get_Proj_pred(irn);
assert(!is_Proj(irn));
}
ops = get_irn_op(irn);
be_ops = get_op_ops(ops)->be_ops;
ir_op *ops = get_irn_op(irn);
const arch_irn_ops_t *be_ops = get_op_ops(ops)->be_ops;
return be_ops;
}
......
......@@ -191,7 +191,7 @@ void (set_generic_function_ptr)(ir_op *op, op_func func)
set_generic_function_ptr_(op, func);
}
const ir_op_ops *(get_op_ops)(const ir_op *op)
ir_op_ops *(get_op_ops)(ir_op *op)
{
return get_op_ops_(op);
}
......
......@@ -144,7 +144,7 @@ static inline op_func get_generic_function_ptr_(const ir_op *op)
return op->ops.generic;
}
static inline const ir_op_ops *get_op_ops_(const ir_op *op)
static inline ir_op_ops *get_op_ops_(ir_op *op)
{
return &op->ops;
}
......
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