From: Jason Ekstrand Date: Wed, 17 Feb 2016 21:45:24 +0000 (-0800) Subject: nir: Add a nir_foreach_variable_safe helper X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8c05b44bbb317b5547f1079d1957c05ac29a591e;p=mesa.git nir: Add a nir_foreach_variable_safe helper --- diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 9c478870626..932cab62e64 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -338,6 +338,9 @@ typedef struct nir_variable { #define nir_foreach_variable(var, var_list) \ foreach_list_typed(nir_variable, var, node, var_list) +#define nir_foreach_variable_safe(var, var_list) \ + foreach_list_typed_safe(nir_variable, var, node, var_list) + static inline bool nir_variable_is_global(const nir_variable *var) {