blob: 5284b533253d02a95136160e50f1b399e446a5a2 [file] [log] [blame]
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01001/*===-- clang-c/Platform.h - C Index platform decls -------------*- C -*-===*\
2|* *|
Andrew Walbran16937d02019-10-22 13:54:20 +01003|* 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 *|
Andrew Scull5e1ddfa2018-08-14 10:06:54 +01007|* *|
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#ifdef __cplusplus
18extern "C" {
19#endif
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#ifdef __cplusplus
43}
44#endif
45#endif