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 57b8be3dde2b7f4f5005bee69e442dcd45770108..405e67394362c34f78838e355926ae0a5e144cca 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 1db4e8cea368140bdf62486268a3000825867ea3..4d7a532a7f17452d1efb1cd94efac0201c1c0ce2 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 201f278c71c887f5efd24bc9c48ceff374060197..1d6bbbc25d395b819cdd71163b4999578445aa6e 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 b496aec035a8864926b2e4c3124fc2bbf4014f57..a487eb04660edd787cd89f51b410d5dba5f70f13 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 f32b57a8cef85e95a1c8739070fed1adba032129..31e6d3c0e9fe0db3043b9faf06d0376a48cc76ef 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 939e8ddbf58505105475dc67f1364e2a4adfb5d5..26817f62e96bfa5d2be8bc12372ddcb1e21c29ae 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 b7f862e8c0459a40389c27d7b8a062fc4a22bcec..18c2305171709548f52bc2f6d313887e56efb484 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 a4dc18a2b22df27826db9db04ba73796e64a6526..c663d04183f02c51f3e0ebee8e50f6b62bc2096a 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 753783316a235e01a4f759f33e8e9d2f77c02262..d01c039cfd23fb66796e82a3eeb2bc35aac72f01 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 829bff24a555f09de58bd7b3cfc1ea88913e4901..39521a386cef89b67ca26de96ccb0cb0cc4f88d5 100644 (file)
@@ -25,7 +25,6 @@
  *
  */
 
-#pragma once
 
 #ifndef _NIR_WORKLIST_
 #define _NIR_WORKLIST_