Commit 5b485610 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

irnodemap: Assert that the index is less than the length in...

irnodemap: Assert that the index is less than the length in ir_nodemap_insert_fast() and ir_nodemap_get_fast().
parent 17a90439
......@@ -69,6 +69,7 @@ static inline void ir_nodemap_insert_fast(ir_nodemap *nodemap,
const ir_node *node, void *data)
{
unsigned idx = get_irn_idx(node);
assert(idx < ARR_LEN(nodemap->data));
nodemap->data[idx] = data;
}
......@@ -108,6 +109,7 @@ static inline void *ir_nodemap_get_fast(const ir_nodemap *nodemap,
const ir_node *node)
{
unsigned idx = get_irn_idx(node);
assert(idx < ARR_LEN(nodemap->data));
return nodemap->data[idx];
}
......
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