diff options
author | Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> | 2012-06-28 22:01:06 +0000 |
---|---|---|
committer | Arnaud A. de Grandmaison <arnaud.adegm@gmail.com> | 2012-06-28 22:01:06 +0000 |
commit | db2a685287e57d9dfec09c867152c465af6fc6b0 (patch) | |
tree | ddc14ebb831dd77eef5deb95fcc0530b8f51568e /include/clang-c/Platform.h | |
parent | 50badd523b9b90c0731423d002b13a00bf754036 (diff) |
Factor CXString out of Index.h
No functionnal or interface change. This is done to prepare the landing of
CompilationDatabase in libclang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c/Platform.h')
-rw-r--r-- | include/clang-c/Platform.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/clang-c/Platform.h b/include/clang-c/Platform.h new file mode 100644 index 0000000000..0f866c6456 --- /dev/null +++ b/include/clang-c/Platform.h @@ -0,0 +1,45 @@ +/*===-- clang-c/Platform.h - C Index platform decls -------------*- C -*-===*\ +|* *| +|* The LLVM Compiler Infrastructure *| +|* *| +|* This file is distributed under the University of Illinois Open Source *| +|* License. See LICENSE.TXT for details. *| +|* *| +|*===----------------------------------------------------------------------===*| +|* *| +|* This header provides platform specific macros (dllimport, deprecated, ...) *| +|* *| +\*===----------------------------------------------------------------------===*/ + +#ifndef CLANG_C_PLATFORM_H +#define CLANG_C_PLATFORM_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* MSVC DLL import/export. */ +#ifdef _MSC_VER + #ifdef _CINDEX_LIB_ + #define CINDEX_LINKAGE __declspec(dllexport) + #else + #define CINDEX_LINKAGE __declspec(dllimport) + #endif +#else + #define CINDEX_LINKAGE +#endif + +#ifdef __GNUC__ + #define CINDEX_DEPRECATED __attribute__((deprecated)) +#else + #ifdef _MSC_VER + #define CINDEX_DEPRECATED __declspec(deprecated) + #else + #define CINDEX_DEPRECATED + #endif +#endif + +#ifdef __cplusplus +} +#endif +#endif |