Commit a161f099 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

api: Remove set_irn_op() from the public API.

There is no legitimate reason for an outside user to change the op of a node.
Even internally it should be used less, i.e. only for Deleted, Id and Tuple.
parent 4541cb4a
......@@ -126,8 +126,6 @@ FIRM_API void set_irn_mode(ir_node *node, ir_mode *mode);
FIRM_API ir_mode *get_irn_mode(const ir_node *node);
/** Returns the opcode struct of the node. */
FIRM_API ir_op *get_irn_op(const ir_node *node);
/** Sets the opcode struct of the node. */
FIRM_API void set_irn_op(ir_node *node, ir_op *op);
/** Returns the opcode-enum of the node. */
FIRM_API unsigned get_irn_opcode(const ir_node *node);
/** Returns the string representation of the opcode. */
......
......@@ -318,11 +318,6 @@ ir_op *(get_irn_op)(const ir_node *node)
return get_irn_op_(node);
}
void (set_irn_op)(ir_node *node, ir_op *op)
{
set_irn_op_(node, op);
}
unsigned (get_irn_opcode)(const ir_node *node)
{
return get_irn_opcode_(node);
......
......@@ -27,7 +27,6 @@
#define get_irn_irg(node) get_irn_irg_(node)
#define get_nodes_block(node) get_nodes_block_(node)
#define get_irn_op(node) get_irn_op_(node)
#define set_irn_op(node, op) set_irn_op_(node, op)
#define get_irn_opcode(node) get_irn_opcode_(node)
#define get_irn_visited(node) get_irn_visited_(node)
#define set_irn_visited(node, v) set_irn_visited_(node, v)
......@@ -110,7 +109,10 @@ static inline ir_op *get_irn_op_(const ir_node *node)
return node->op;
}
static inline void set_irn_op_(ir_node *node, ir_op *op)
/**
* Sets the opcode struct of the node.
*/
static inline void set_irn_op(ir_node *node, ir_op *op)
{
node->op = op;
}
......
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