From e3de145fa26dadf43f6e14ed69aace6a550cd157 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 20 Mar 2017 16:04:16 +0000 Subject: [PATCH] nir: consistently use ifndef guards over pragma once MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Emil Velikov Acked-by: Vedran Miletić Acked-by: Juha-Pekka Heikkila Reviewed-by: Edward O'Callaghan --- src/compiler/nir/nir.h | 5 ++++- src/compiler/nir/nir_array.h | 5 ++++- src/compiler/nir/nir_constant_expressions.h | 5 +++++ src/compiler/nir/nir_control_flow.h | 7 +++++-- src/compiler/nir/nir_control_flow_private.h | 6 +++++- src/compiler/nir/nir_instr_set.h | 4 +++- src/compiler/nir/nir_loop_analyze.h | 5 ++++- src/compiler/nir/nir_phi_builder.h | 5 ++++- src/compiler/nir/nir_vla.h | 6 ++++-- src/compiler/nir/nir_worklist.h | 1 - 10 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 57b8be3..405e673 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -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 */ diff --git a/src/compiler/nir/nir_array.h b/src/compiler/nir/nir_array.h index 1db4e8c..4d7a532 100644 --- a/src/compiler/nir/nir_array.h +++ b/src/compiler/nir/nir_array.h @@ -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 */ diff --git a/src/compiler/nir/nir_constant_expressions.h b/src/compiler/nir/nir_constant_expressions.h index 201f278..1d6bbbc 100644 --- a/src/compiler/nir/nir_constant_expressions.h +++ b/src/compiler/nir/nir_constant_expressions.h @@ -25,7 +25,12 @@ * */ +#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 */ diff --git a/src/compiler/nir/nir_control_flow.h b/src/compiler/nir/nir_control_flow.h index b496aec..a487eb0 100644 --- a/src/compiler/nir/nir_control_flow.h +++ b/src/compiler/nir/nir_control_flow.h @@ -25,9 +25,10 @@ * */ -#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 */ diff --git a/src/compiler/nir/nir_control_flow_private.h b/src/compiler/nir/nir_control_flow_private.h index f32b57a..31e6d3c 100644 --- a/src/compiler/nir/nir_control_flow_private.h +++ b/src/compiler/nir/nir_control_flow_private.h @@ -25,9 +25,11 @@ * */ +#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 */ diff --git a/src/compiler/nir/nir_instr_set.h b/src/compiler/nir/nir_instr_set.h index 939e8dd..26817f6 100644 --- a/src/compiler/nir/nir_instr_set.h +++ b/src/compiler/nir/nir_instr_set.h @@ -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 */ diff --git a/src/compiler/nir/nir_loop_analyze.h b/src/compiler/nir/nir_loop_analyze.h index b7f862e..18c2305 100644 --- a/src/compiler/nir/nir_loop_analyze.h +++ b/src/compiler/nir/nir_loop_analyze.h @@ -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 */ diff --git a/src/compiler/nir/nir_phi_builder.h b/src/compiler/nir/nir_phi_builder.h index a4dc18a..c663d04 100644 --- a/src/compiler/nir/nir_phi_builder.h +++ b/src/compiler/nir/nir_phi_builder.h @@ -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 */ diff --git a/src/compiler/nir/nir_vla.h b/src/compiler/nir/nir_vla.h index 7537833..d01c039 100644 --- a/src/compiler/nir/nir_vla.h +++ b/src/compiler/nir/nir_vla.h @@ -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 */ diff --git a/src/compiler/nir/nir_worklist.h b/src/compiler/nir/nir_worklist.h index 829bff2..39521a3 100644 --- a/src/compiler/nir/nir_worklist.h +++ b/src/compiler/nir/nir_worklist.h @@ -25,7 +25,6 @@ * */ -#pragma once #ifndef _NIR_WORKLIST_ #define _NIR_WORKLIST_ -- 2.7.4