Commit 288b414e authored by Matthias Braun's avatar Matthias Braun
Browse files

fix wrong assert, expor copy_node_attr function to public API

[r26153]
parent 1a68ac34
......@@ -1355,6 +1355,12 @@ ir_mode *get_divop_resmod(const ir_node *node);
* operation: Cond. */
int is_irn_forking(const ir_node *node);
/**
* Copies all attributes stored in the old node to the new node.
* Assumes both have the same opcode and sufficient size.
*/
void copy_node_attr(const ir_node *old_node, ir_node *new_node);
/** Return the type associated with the value produced by n
* if the node remarks this type as it is the case for
* Cast, Const, SymConst and some Proj nodes or unknown_type. */
......
......@@ -250,7 +250,7 @@ _set_irg_current_block(ir_graph *irg, ir_node *node) {
static inline ir_entity *
_get_irg_entity(const ir_graph *irg) {
assert(irg && irg->ent);
assert(irg);
return irg->ent;
}
......
......@@ -2769,6 +2769,10 @@ int (is_irn_forking)(const ir_node *node) {
return _is_irn_forking(node);
}
void (copy_node_attr)(const ir_node *old_node, ir_node *new_node) {
return _copy_node_attr(old_node, new_node);
}
/* Return the type associated with the value produced by n
* if the node remarks this type as it is the case for
* Cast, Const, SymConst and some Proj nodes. */
......
......@@ -140,7 +140,7 @@ _set_irn_op(ir_node *node, ir_op *op) {
/** Copies all attributes stored in the old node to the new node.
Assumes both have the same opcode and sufficient size. */
static inline void
copy_node_attr(const ir_node *old_node, ir_node *new_node) {
_copy_node_attr(const ir_node *old_node, ir_node *new_node) {
ir_op *op = _get_irn_op(old_node);
/* must always exist */
......@@ -741,6 +741,7 @@ _is_arg_Proj(const ir_node *node) {
#define is_Const_one(node) _is_Const_one(node)
#define is_Const_all_one(node) _is_Const_all_one(node)
#define is_irn_forking(node) _is_irn_forking(node)
#define copy_node_attr(oldn,newn) _copy_node_attr(oldn,newn)
#define get_irn_type(node) _get_irn_type(node)
#define get_irn_type_attr(node) _get_irn_type_attr(node)
#define get_irn_entity_attr(node) _get_irn_entity_attr(node)
......
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