[Mesa-dev] [PATCH 04/26] nir: Add a variable_foreach_safe helper

Jason Ekstrand jason at jlekstrand.net
Fri Mar 25 23:12:18 UTC 2016


---
 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 33bb1fd..68df76c 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -339,6 +339,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.5.0.400.gff86faf



More information about the mesa-dev mailing list