brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · dfa21bd Raw
40 lines · c
1/*===- llvm-c/ExternC.h - Wrapper for 'extern "C"' ----------------*- 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 an 'extern "C"' wrapper                                  *|11|*                                                                            *|12\*===----------------------------------------------------------------------===*/13 14#ifndef LLVM_C_EXTERNC_H15#define LLVM_C_EXTERNC_H16 17#ifdef __clang__18#define LLVM_C_STRICT_PROTOTYPES_BEGIN                                         \19  _Pragma("clang diagnostic push")                                             \20      _Pragma("clang diagnostic error \"-Wstrict-prototypes\"")21#define LLVM_C_STRICT_PROTOTYPES_END _Pragma("clang diagnostic pop")22#else23#define LLVM_C_STRICT_PROTOTYPES_BEGIN24#define LLVM_C_STRICT_PROTOTYPES_END25#endif26 27#ifdef __cplusplus28#define LLVM_C_EXTERN_C_BEGIN                                                  \29  extern "C" {                                                                 \30  LLVM_C_STRICT_PROTOTYPES_BEGIN31#define LLVM_C_EXTERN_C_END                                                    \32  LLVM_C_STRICT_PROTOTYPES_END                                                 \33  }34#else35#define LLVM_C_EXTERN_C_BEGIN LLVM_C_STRICT_PROTOTYPES_BEGIN36#define LLVM_C_EXTERN_C_END LLVM_C_STRICT_PROTOTYPES_END37#endif38 39#endif40