diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 0e30adea2c5..7d8256a9713 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -4005,7 +4005,7 @@ typedef struct nir_shader { foreach_list_typed(nir_function, func, node, &(shader)->functions) static inline nir_function * -_nir_foreach_function_with_impl_first(const nir_shader *shader) +nir_foreach_function_with_impl_first(const nir_shader *shader) { foreach_list_typed(nir_function, func, node, &shader->functions) { if (func->impl != NULL) @@ -4016,7 +4016,7 @@ _nir_foreach_function_with_impl_first(const nir_shader *shader) } static inline nir_function_impl * -_nir_foreach_function_with_impl_next(const nir_function **it) +nir_foreach_function_with_impl_next(nir_function **it) { foreach_list_typed_from(nir_function, func, node, _, (*it)->node.next) { if (func->impl != NULL) { @@ -4028,14 +4028,14 @@ _nir_foreach_function_with_impl_next(const nir_function **it) return NULL; } -#define nir_foreach_function_with_impl(it, impl_it, shader) \ - for (const nir_function *it =_nir_foreach_function_with_impl_first(shader); \ - it != NULL; \ - it = NULL) \ - \ - for (nir_function_impl *impl_it = it->impl; \ - impl_it != NULL; \ - impl_it = _nir_foreach_function_with_impl_next(&it)) \ +#define nir_foreach_function_with_impl(it, impl_it, shader) \ + for (nir_function *it =nir_foreach_function_with_impl_first(shader); \ + it != NULL; \ + it = NULL) \ + \ + for (nir_function_impl *impl_it = it->impl; \ + impl_it != NULL; \ + impl_it = nir_foreach_function_with_impl_next(&it)) /* Equivalent to *