nir: add nir_foreach_phi_src_safe()
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 22 Jul 2015 02:54:20 +0000 (19:54 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 24 Aug 2015 20:31:41 +0000 (13:31 -0700)
Signed-off-by: Connor Abbott <connor.w.abbott@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/nir/nir.h

index 6a0ec44b018568b8521fb1692fee22b2bb2fb5bd..d19a1907d47c3a30ff3ab2ff3a6f0c0f5d6088a4 100644 (file)
@@ -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;