Platform.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. #ifndef CINDEX_LINKAGE
  20. #ifdef _MSC_VER
  21. #ifdef _CINDEX_LIB_
  22. #define CINDEX_LINKAGE __declspec(dllexport)
  23. #else
  24. #define CINDEX_LINKAGE __declspec(dllimport)
  25. #endif
  26. #else
  27. #define CINDEX_LINKAGE
  28. #endif
  29. #endif
  30. // HLSL Change starts.
  31. // This includes the LIBCLANG_CC inclusion in this file to be explicit
  32. // about the calling convenion in use.
  33. #ifndef LIBCLANG_CC
  34. #ifdef _MSC_VER
  35. // DLL APIs should use the standard call convention like other WINAPI APIs.
  36. #define LIBCLANG_CC __stdcall
  37. #else
  38. #define LIBCLANG_CC
  39. #endif
  40. #endif
  41. // HLSL Change ends.
  42. #ifdef __GNUC__
  43. #define CINDEX_DEPRECATED __attribute__((deprecated))
  44. #else
  45. #ifdef _MSC_VER
  46. #define CINDEX_DEPRECATED __declspec(deprecated)
  47. #else
  48. #define CINDEX_DEPRECATED
  49. #endif
  50. #endif
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54. #endif