From 8c05b44bbb317b5547f1079d1957c05ac29a591e Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 17 Feb 2016 13:45:24 -0800 Subject: [PATCH] nir: Add a nir_foreach_variable_safe helper --- src/compiler/nir/nir.h | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.30.2