[Mesa-dev] [PATCH 02/18] ac: consistently use ifndef guards over pragma once

Marek Olšák maraeo at gmail.com
Mon Mar 20 16:31:07 UTC 2017


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Mon, Mar 20, 2017 at 5:12 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>  src/amd/common/ac_binary.h      | 5 ++++-
>  src/amd/common/ac_llvm_util.h   | 6 +++++-
>  src/amd/common/ac_nir_to_llvm.h | 4 +++-
>  3 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/src/amd/common/ac_binary.h b/src/amd/common/ac_binary.h
> index 0ece9297253..a784a7220cc 100644
> --- a/src/amd/common/ac_binary.h
> +++ b/src/amd/common/ac_binary.h
> @@ -24,7 +24,8 @@
>   *
>   */
>
> -#pragma once
> +#ifndef AC_BINARY_H
> +#define AC_BINARY_H
>
>  #include <stdint.h>
>  #include <stdbool.h>
> @@ -97,3 +98,5 @@ void ac_shader_binary_read_config(struct ac_shader_binary *binary,
>                                   struct ac_shader_config *conf,
>                                   unsigned symbol_offset,
>                                   bool supports_spill);
> +
> +#endif /* AC_BINARY_H */
> diff --git a/src/amd/common/ac_llvm_util.h b/src/amd/common/ac_llvm_util.h
> index 4b0ccdd38ff..faecf1efd01 100644
> --- a/src/amd/common/ac_llvm_util.h
> +++ b/src/amd/common/ac_llvm_util.h
> @@ -22,7 +22,9 @@
>   * of the Software.
>   *
>   */
> -#pragma once
> +
> +#ifndef AC_LLVM_UTIL_H
> +#define AC_LLVM_UTIL_H
>
>  #include <stdbool.h>
>  #include <llvm-c/TargetMachine.h>
> @@ -65,3 +67,5 @@ void ac_dump_module(LLVMModuleRef module);
>  #ifdef __cplusplus
>  }
>  #endif
> +
> +#endif /* AC_LLVM_UTIL_H */
> diff --git a/src/amd/common/ac_nir_to_llvm.h b/src/amd/common/ac_nir_to_llvm.h
> index bb860e5d199..b4c4a73a1c1 100644
> --- a/src/amd/common/ac_nir_to_llvm.h
> +++ b/src/amd/common/ac_nir_to_llvm.h
> @@ -21,7 +21,8 @@
>   * IN THE SOFTWARE.
>   */
>
> -#pragma once
> +#ifndef AC_NIR_TO_LLVM_H
> +#define AC_NIR_TO_LLVM_H
>
>  #include <stdbool.h>
>  #include "llvm-c/Core.h"
> @@ -157,3 +158,4 @@ void ac_create_gs_copy_shader(LLVMTargetMachineRef tm,
>                               const struct ac_nir_compiler_options *options,
>                               bool dump_shader);
>
> +#endif /* AC_NIR_TO_LLVM_H */
> --
> 2.11.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list