1f4a2713aSLionel Sambuc /*===-- clang-c/Platform.h - C Index platform decls -------------*- C -*-===*\ 2f4a2713aSLionel Sambuc |* *| 3f4a2713aSLionel Sambuc |* The LLVM Compiler Infrastructure *| 4f4a2713aSLionel Sambuc |* *| 5f4a2713aSLionel Sambuc |* This file is distributed under the University of Illinois Open Source *| 6f4a2713aSLionel Sambuc |* License. See LICENSE.TXT for details. *| 7f4a2713aSLionel Sambuc |* *| 8f4a2713aSLionel Sambuc |*===----------------------------------------------------------------------===*| 9f4a2713aSLionel Sambuc |* *| 10f4a2713aSLionel Sambuc |* This header provides platform specific macros (dllimport, deprecated, ...) *| 11f4a2713aSLionel Sambuc |* *| 12f4a2713aSLionel Sambuc \*===----------------------------------------------------------------------===*/ 13f4a2713aSLionel Sambuc 14*0a6a1f1dSLionel Sambuc #ifndef LLVM_CLANG_C_PLATFORM_H 15*0a6a1f1dSLionel Sambuc #define LLVM_CLANG_C_PLATFORM_H 16f4a2713aSLionel Sambuc 17f4a2713aSLionel Sambuc #ifdef __cplusplus 18f4a2713aSLionel Sambuc extern "C" { 19f4a2713aSLionel Sambuc #endif 20f4a2713aSLionel Sambuc 21f4a2713aSLionel Sambuc /* MSVC DLL import/export. */ 22f4a2713aSLionel Sambuc #ifdef _MSC_VER 23f4a2713aSLionel Sambuc #ifdef _CINDEX_LIB_ 24f4a2713aSLionel Sambuc #define CINDEX_LINKAGE __declspec(dllexport) 25f4a2713aSLionel Sambuc #else 26f4a2713aSLionel Sambuc #define CINDEX_LINKAGE __declspec(dllimport) 27f4a2713aSLionel Sambuc #endif 28f4a2713aSLionel Sambuc #else 29f4a2713aSLionel Sambuc #define CINDEX_LINKAGE 30f4a2713aSLionel Sambuc #endif 31f4a2713aSLionel Sambuc 32f4a2713aSLionel Sambuc #ifdef __GNUC__ 33f4a2713aSLionel Sambuc #define CINDEX_DEPRECATED __attribute__((deprecated)) 34f4a2713aSLionel Sambuc #else 35f4a2713aSLionel Sambuc #ifdef _MSC_VER 36f4a2713aSLionel Sambuc #define CINDEX_DEPRECATED __declspec(deprecated) 37f4a2713aSLionel Sambuc #else 38f4a2713aSLionel Sambuc #define CINDEX_DEPRECATED 39f4a2713aSLionel Sambuc #endif 40f4a2713aSLionel Sambuc #endif 41f4a2713aSLionel Sambuc 42f4a2713aSLionel Sambuc #ifdef __cplusplus 43f4a2713aSLionel Sambuc } 44f4a2713aSLionel Sambuc #endif 45f4a2713aSLionel Sambuc #endif 46