Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:01

0001 /*===- llvm-c/ExternC.h - Wrapper for 'extern "C"' ----------------*- C -*-===*\
0002 |*                                                                            *|
0003 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM          *|
0004 |* Exceptions.                                                                *|
0005 |* See https://llvm.org/LICENSE.txt for license information.                  *|
0006 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception                    *|
0007 |*                                                                            *|
0008 |*===----------------------------------------------------------------------===*|
0009 |*                                                                            *|
0010 |* This file defines an 'extern "C"' wrapper                                  *|
0011 |*                                                                            *|
0012 \*===----------------------------------------------------------------------===*/
0013 
0014 #ifndef LLVM_C_EXTERNC_H
0015 #define LLVM_C_EXTERNC_H
0016 
0017 #ifdef __clang__
0018 #define LLVM_C_STRICT_PROTOTYPES_BEGIN                                         \
0019   _Pragma("clang diagnostic push")                                             \
0020       _Pragma("clang diagnostic error \"-Wstrict-prototypes\"")
0021 #define LLVM_C_STRICT_PROTOTYPES_END _Pragma("clang diagnostic pop")
0022 #else
0023 #define LLVM_C_STRICT_PROTOTYPES_BEGIN
0024 #define LLVM_C_STRICT_PROTOTYPES_END
0025 #endif
0026 
0027 #ifdef __cplusplus
0028 #define LLVM_C_EXTERN_C_BEGIN                                                  \
0029   extern "C" {                                                                 \
0030   LLVM_C_STRICT_PROTOTYPES_BEGIN
0031 #define LLVM_C_EXTERN_C_END                                                    \
0032   LLVM_C_STRICT_PROTOTYPES_END                                                 \
0033   }
0034 #else
0035 #define LLVM_C_EXTERN_C_BEGIN LLVM_C_STRICT_PROTOTYPES_BEGIN
0036 #define LLVM_C_EXTERN_C_END LLVM_C_STRICT_PROTOTYPES_END
0037 #endif
0038 
0039 #endif