With -DDEBUG -UNDEBUG, this assert uses reg_state::stack_size, which
doesn't exist, breaking the build:
assert(state->states[index].index < state->states[index].stack_size);
Switch it to ifndef NDEBUG, so the field will exist if the assertion
actually generates code.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
nir_ssa_def **stack;
int index;
unsigned num_defs; /** < used to add indices to debug names */
-#ifdef DEBUG
+#ifndef NDEBUG
unsigned stack_size;
#endif
} reg_state;
state->states[reg->index].stack = ralloc_array(state->states,
nir_ssa_def *,
stack_size);
-#ifdef DEBUG
+#ifndef NDEBUG
state->states[reg->index].stack_size = stack_size;
#endif
state->states[reg->index].index = -1;