blob: 5284b533253d02a95136160e50f1b399e446a5a2 [file] [log] [blame]
Arnaud A. de Grandmaison0271b322012-06-28 22:01:06 +00001/*===-- clang-c/Platform.h - C Index platform decls -------------*- C -*-===*\
2|* *|
Chandler Carruth2946cd72019-01-19 08:50:56 +00003|* 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 *|
Arnaud A. de Grandmaison0271b322012-06-28 22:01:06 +00007|* *|
8|*===----------------------------------------------------------------------===*|
9|* *|
10|* This header provides platform specific macros (dllimport, deprecated, ...) *|
11|* *|
12\*===----------------------------------------------------------------------===*/
13
Benjamin Kramer2f5db8b2014-08-13 16:25:19 +000014#ifndef LLVM_CLANG_C_PLATFORM_H
15#define LLVM_CLANG_C_PLATFORM_H
Arnaud A. de Grandmaison0271b322012-06-28 22:01:06 +000016
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