nir: Add a nir_foreach_function_temp_variable helper
[mesa.git] / src / compiler / nir / nir_validate.c
index 68396d1108c8559236c460cca898584f84ccc3fd..47beec0fa3f7b479c3c9cf01f2f3b85ba0ef4e3a 100644 (file)
@@ -1178,7 +1178,7 @@ validate_function_impl(nir_function_impl *impl, validate_state *state)
    state->parent_node = &impl->cf_node;
 
    exec_list_validate(&impl->locals);
    state->parent_node = &impl->cf_node;
 
    exec_list_validate(&impl->locals);
-   nir_foreach_variable(var, &impl->locals) {
+   nir_foreach_function_temp_variable(var, impl) {
       validate_var_decl(var, nir_var_function_temp, state);
    }
 
       validate_var_decl(var, nir_var_function_temp, state);
    }