brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · dd83903 Raw
42 lines · c
1/*===- ExternC.h - C API for the ORC runtime ----------------------*- C -*-===*\2|*                                                                            *|3|* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|4|* Exceptions.                                                                *|5|* See https://llvm.org/LICENSE.txt for license information.                  *|6|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|7|*                                                                            *|8|*===----------------------------------------------------------------------===*|9|*                                                                            *|10|* This file defines the C API for the ORC runtime                            *|11|*                                                                            *|12\*===----------------------------------------------------------------------===*/13 14#ifndef ORC_RT_C_EXTERNC_H15#define ORC_RT_C_EXTERNC_H16 17/* Helper to suppress strict prototype warnings. */18#ifdef __clang__19#define ORC_RT_C_STRICT_PROTOTYPES_BEGIN                                       \20  _Pragma("clang diagnostic push")                                             \21      _Pragma("clang diagnostic error \"-Wstrict-prototypes\"")22#define ORC_RT_C_STRICT_PROTOTYPES_END _Pragma("clang diagnostic pop")23#else24#define ORC_RT_C_STRICT_PROTOTYPES_BEGIN25#define ORC_RT_C_STRICT_PROTOTYPES_END26#endif27 28/* Helper to wrap C code for C++ */29#ifdef __cplusplus30#define ORC_RT_C_EXTERN_C_BEGIN                                                \31  extern "C" {                                                                 \32  ORC_RT_C_STRICT_PROTOTYPES_BEGIN33#define ORC_RT_C_EXTERN_C_END                                                  \34  ORC_RT_C_STRICT_PROTOTYPES_END                                               \35  }36#else37#define ORC_RT_C_EXTERN_C_BEGIN ORC_RT_C_STRICT_PROTOTYPES_BEGIN38#define ORC_RT_C_EXTERN_C_END ORC_RT_C_STRICT_PROTOTYPES_END39#endif40 41#endif /* ORC_RT_C_EXTERNC_H */42