Commit 6ee09e39 authored by Matthias Braun's avatar Matthias Braun
Browse files

do more assert checking in set_irn_in

parent 35a74825
......@@ -231,6 +231,13 @@ void set_irn_in(ir_node *node, int arity, ir_node **in)
pOld_in = &node->in;
#ifndef NDEBUG
assert(node != NULL && node->kind == k_ir_node);
assert(arity >= 0);
for (i = 0; i < arity; ++i) {
assert(in[i] != NULL && in[0]->kind == k_ir_node);
}
#endif
for (i = 0; i < arity; i++) {
if (i < (int)ARR_LEN(*pOld_in)-1)
......
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