Printing instructions doesn't modify them, so we can mark the parameter
const.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
void nir_index_blocks(nir_function_impl *impl);
void nir_print_shader(nir_shader *shader, FILE *fp);
-void nir_print_instr(nir_instr *instr, FILE *fp);
+void nir_print_instr(const nir_instr *instr, FILE *fp);
#ifdef DEBUG
void nir_validate_shader(nir_shader *shader);
}
static void
-print_instr(nir_instr *instr, print_var_state *state, unsigned tabs, FILE *fp)
+print_instr(const nir_instr *instr, print_var_state *state, unsigned tabs, FILE *fp)
{
print_tabs(tabs, fp);
}
void
-nir_print_instr(nir_instr *instr, FILE *fp)
+nir_print_instr(const nir_instr *instr, FILE *fp)
{
print_instr(instr, NULL, 0, fp);
}