nir: consistently use ifndef guards over pragma once
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 20 Mar 2017 16:04:16 +0000 (16:04 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 22 Mar 2017 16:55:22 +0000 (16:55 +0000)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Vedran Miletić <vedran@miletic.net>
Acked-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/compiler/nir/nir.h
src/compiler/nir/nir_array.h
src/compiler/nir/nir_constant_expressions.h
src/compiler/nir/nir_control_flow.h
src/compiler/nir/nir_control_flow_private.h
src/compiler/nir/nir_instr_set.h
src/compiler/nir/nir_loop_analyze.h
src/compiler/nir/nir_phi_builder.h
src/compiler/nir/nir_vla.h
src/compiler/nir/nir_worklist.h

index 57b8be3..405e673 100644 (file)
@@ -25,7 +25,8 @@
  *
  */
 
-#pragma once
+#ifndef NIR_H
+#define NIR_H
 
 #include "util/hash_table.h"
 #include "compiler/glsl/list.h"
@@ -2634,3 +2635,5 @@ gl_system_value nir_system_value_from_intrinsic(nir_intrinsic_op intrin);
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
+
+#endif /* NIR_H */
index 1db4e8c..4d7a532 100644 (file)
@@ -25,7 +25,8 @@
  *
  */
 
-#pragma once
+#ifndef NIR_ARRAY_H
+#define NIR_ARRAY_H
 
 #ifdef __cplusplus
 extern "C" {
@@ -94,3 +95,5 @@ nir_array_grow(nir_array *arr, size_t additional)
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
+
+#endif /* NIR_ARRAY_H */
index 201f278..1d6bbbc 100644 (file)
  *
  */
 
+#ifndef NIR_CONSTANT_EXPRESSIONS_H
+#define NIR_CONSTANT_EXPRESSIONS_H
+
 #include "nir.h"
 
 nir_const_value nir_eval_const_opcode(nir_op op, unsigned num_components,
                                       unsigned bit_size, nir_const_value *src);
+
+#endif /* NIR_CONSTANT_EXPRESSIONS_H */
index b496aec..a487eb0 100644 (file)
  *
  */
 
-#include "nir.h"
+#ifndef NIR_CONTROL_FLOW_H
+#define NIR_CONTROL_FLOW_H
 
-#pragma once
+#include "nir.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -163,3 +164,5 @@ nir_cf_node_remove(nir_cf_node *node)
 #ifdef __cplusplus
 }
 #endif
+
+#endif /* NIR_CONTROL_FLOW_H */
index f32b57a..31e6d3c 100644 (file)
  *
  */
 
+#ifndef NIR_CONTROL_FLOW_PRIVATE_H
+#define NIR_CONTROL_FLOW_PRIVATE_H
+
 #include "nir_control_flow.h"
 
-#pragma once
 
 /* Internal control-flow modification functions used when inserting/removing
  * instructions.
@@ -35,3 +37,5 @@
 
 void nir_handle_add_jump(nir_block *block);
 void nir_handle_remove_jump(nir_block *block, nir_jump_type type);
+
+#endif /* NIR_CONTROL_FLOW_PRIVATE_H */
index 939e8dd..26817f6 100644 (file)
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef NIR_INSTR_SET_H
+#define NIR_INSTR_SET_H
 
 #include "nir.h"
 
@@ -60,3 +61,4 @@ void nir_instr_set_remove(struct set *instr_set, nir_instr *instr);
 
 /*@}*/
 
+#endif /* NIR_INSTR_SET_H */
index b7f862e..18c2305 100644 (file)
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef NIR_LOOP_ANALYZE_H
+#define NIR_LOOP_ANALYZE_H
 
 #include "nir.h"
 
@@ -90,3 +91,5 @@ nir_is_trivial_loop_if(nir_if *nif, nir_block *break_block)
 
    return true;
 }
+
+#endif /* NIR_LOOP_ANALYZE_H */
index a4dc18a..c663d04 100644 (file)
@@ -21,7 +21,8 @@
  * IN THE SOFTWARE.
  */
 
-#pragma once
+#ifndef NIR_PHI_BUILDER_H
+#define NIR_PHI_BUILDER_H
 
 #include "nir.h"
 
@@ -114,3 +115,5 @@ nir_phi_builder_value_get_block_def(struct nir_phi_builder_value *val,
  * adds the phi nodes to the program.
  */
 void nir_phi_builder_finish(struct nir_phi_builder *pb);
+
+#endif /* NIR_PHI_BUILDER_H */
index 7537833..d01c039 100644 (file)
@@ -25,8 +25,8 @@
  *
  **************************************************************************/
 
-#pragma once
-
+#ifndef NIR_VLA_H
+#define NIR_VLA_H
 
 #include "c99_alloca.h"
 
@@ -52,3 +52,5 @@
  */
 #define NIR_VLA_ZERO(_type, _name, _length) \
    NIR_VLA_FILL(_type, _name, _length, 0)
+
+#endif /* NIR_VLA_H */
index 829bff2..39521a3 100644 (file)
@@ -25,7 +25,6 @@
  *
  */
 
-#pragma once
 
 #ifndef _NIR_WORKLIST_
 #define _NIR_WORKLIST_