From: Connor Abbott Date: Wed, 22 Jul 2015 02:54:20 +0000 (-0700) Subject: nir: add nir_foreach_phi_src_safe() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f41e108d8bdd360caedd1497dc676c928c7f18a3;p=mesa.git nir: add nir_foreach_phi_src_safe() Signed-off-by: Connor Abbott Reviewed-by: Kenneth Graunke --- diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index 6a0ec44b018..d19a1907d47 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1101,6 +1101,8 @@ typedef struct { #define nir_foreach_phi_src(phi, entry) \ foreach_list_typed(nir_phi_src, entry, node, &(phi)->srcs) +#define nir_foreach_phi_src_safe(phi, entry) \ + foreach_list_typed_safe(nir_phi_src, entry, node, &(phi)->srcs) typedef struct { nir_instr instr;