diff options
author | Jason Ekstrand <[email protected]> | 2016-02-17 13:45:24 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-02-17 18:04:39 -0800 |
commit | 8c05b44bbb317b5547f1079d1957c05ac29a591e (patch) | |
tree | 2543872ac8aeca652135c8122c8895192e786910 /src | |
parent | d67d84f5e568feaa988bdda6a23c84aa34b8bbaf (diff) |
nir: Add a nir_foreach_variable_safe helper
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/nir/nir.h | 3 |
1 files changed, 3 insertions, 0 deletions
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) { |