Commit 1c5002c3 authored by yb9976's avatar yb9976
Browse files

Assert that link resource is allocated during get/set_irn_link().

parent c740a32e
......@@ -251,6 +251,7 @@ static inline int irn_visited_else_mark_(ir_node *node)
*/
static inline void set_irn_link_(ir_node *node, void *link)
{
assert(ir_resources_reserved(get_irn_irg(node)) & IR_RESOURCE_IRN_LINK);
node->link = link;
}
......@@ -261,6 +262,7 @@ static inline void set_irn_link_(ir_node *node, void *link)
static inline void *get_irn_link_(const ir_node *node)
{
assert(node->kind == k_ir_node);
assert(ir_resources_reserved(get_irn_irg(node)) & IR_RESOURCE_IRN_LINK);
return node->link;
}
......
Supports Markdown
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