llvm.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. Copyright Rene Rivera 2008-2015
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. #ifndef BOOST_PREDEF_COMPILER_LLVM_H
  8. #define BOOST_PREDEF_COMPILER_LLVM_H
  9. /* Other compilers that emulate this one need to be detected first. */
  10. #include <boost/predef/compiler/clang.h>
  11. #include <boost/predef/version_number.h>
  12. #include <boost/predef/make.h>
  13. /* tag::reference[]
  14. = `BOOST_COMP_LLVM`
  15. http://en.wikipedia.org/wiki/LLVM[LLVM] compiler.
  16. [options="header"]
  17. |===
  18. | {predef_symbol} | {predef_version}
  19. | `+__llvm__+` | {predef_detection}
  20. |===
  21. */ // end::reference[]
  22. #define BOOST_COMP_LLVM BOOST_VERSION_NUMBER_NOT_AVAILABLE
  23. #if defined(__llvm__)
  24. # define BOOST_COMP_LLVM_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
  25. #endif
  26. #ifdef BOOST_COMP_LLVM_DETECTION
  27. # if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
  28. # define BOOST_COMP_LLVM_EMULATED BOOST_COMP_LLVM_DETECTION
  29. # else
  30. # undef BOOST_COMP_LLVM
  31. # define BOOST_COMP_LLVM BOOST_COMP_LLVM_DETECTION
  32. # endif
  33. # define BOOST_COMP_LLVM_AVAILABLE
  34. # include <boost/predef/detail/comp_detected.h>
  35. #endif
  36. #define BOOST_COMP_LLVM_NAME "LLVM"
  37. #endif
  38. #include <boost/predef/detail/test.h>
  39. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_LLVM,BOOST_COMP_LLVM_NAME)
  40. #ifdef BOOST_COMP_LLVM_EMULATED
  41. #include <boost/predef/detail/test.h>
  42. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_LLVM_EMULATED,BOOST_COMP_LLVM_NAME)
  43. #endif