xref: /freebsd/contrib/llvm-project/clang/include/clang-c/Platform.h (revision b0d29bc47dba79f6f38e67eabadfb4b32ffd9390)
1 /*===-- clang-c/Platform.h - C Index platform decls   -------------*- 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 header provides platform specific macros (dllimport, deprecated, ...) *|
11 |*                                                                            *|
12 \*===----------------------------------------------------------------------===*/
13 
14 #ifndef LLVM_CLANG_C_PLATFORM_H
15 #define LLVM_CLANG_C_PLATFORM_H
16 
17 #include "clang-c/ExternC.h"
18 
19 LLVM_CLANG_C_EXTERN_C_BEGIN
20 
21 /* MSVC DLL import/export. */
22 #ifdef _MSC_VER
23   #ifdef _CINDEX_LIB_
24     #define CINDEX_LINKAGE __declspec(dllexport)
25   #else
26     #define CINDEX_LINKAGE __declspec(dllimport)
27   #endif
28 #else
29   #define CINDEX_LINKAGE
30 #endif
31 
32 #ifdef __GNUC__
33   #define CINDEX_DEPRECATED __attribute__((deprecated))
34 #else
35   #ifdef _MSC_VER
36     #define CINDEX_DEPRECATED __declspec(deprecated)
37   #else
38     #define CINDEX_DEPRECATED
39   #endif
40 #endif
41 
42 LLVM_CLANG_C_EXTERN_C_END
43 
44 #endif
45