Platform.h 1.5 KB

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