nir: Add a nir_foreach_function_temp_variable helper
[mesa.git] / src / amd / llvm / ac_nir_to_llvm.c
index 94b920f748a42babdbca575336a1e09afc620fd0..62b5d15a32b64ceabf5b62f735644dee2398f476 100644 (file)
@@ -5254,7 +5254,7 @@ setup_locals(struct ac_nir_context *ctx,
 {
        int i, j;
        ctx->num_locals = 0;
-       nir_foreach_variable(variable, &func->impl->locals) {
+       nir_foreach_function_temp_variable(variable, func->impl) {
                unsigned attrib_count = glsl_count_attribute_slots(variable->type, false);
                variable->data.driver_location = ctx->num_locals * 4;
                variable->data.location_frac = 0;