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

add get_irn_generic_attr_const

[r13979]
parent be436549
......@@ -620,6 +620,11 @@ void *(get_irn_generic_attr)(ir_node *node) {
return _get_irn_generic_attr(node);
}
void *(get_irn_generic_attr_const)(ir_node *node) {
assert(is_ir_node(node));
return _get_irn_generic_attr_const(node);
}
unsigned (get_irn_idx)(const ir_node *node) {
assert(is_ir_node(node));
return _get_irn_idx(node);
......
......@@ -1335,6 +1335,7 @@ unsigned register_additional_node_data(unsigned size);
* Needed for user-defined nodes.
*/
void *get_irn_generic_attr(ir_node *node);
const void *get_irn_generic_attr_const(const ir_node *node);
/**
* Returns the unique node index for the node in its graph.
......
......@@ -995,6 +995,10 @@ static INLINE void *_get_irn_generic_attr(ir_node *node) {
return &node->attr;
}
static INLINE const void *_get_irn_generic_attr_const(const ir_node *node) {
return &node->attr;
}
static INLINE unsigned _get_irn_idx(const ir_node *node) {
return node->node_idx;
}
......@@ -1081,6 +1085,7 @@ static INLINE unsigned _get_irn_idx(const ir_node *node) {
#define set_Cond_jmp_pred(node, pred) _set_Cond_jmp_pred(node, pred)
#define get_Psi_n_conds(node) _get_Psi_n_conds(node)
#define get_irn_generic_attr(node) _get_irn_generic_attr(node)
#define get_irn_generic_attr_const(node) _get_irn_generic_attr_const(node)
#define get_irn_idx(node) _get_irn_idx(node)
#define get_irn_deps(node) _get_irn_deps(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