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 | |
8 | #ifndef BOOST_PREDEF_COMPILER_LLVM_H |
9 | #define BOOST_PREDEF_COMPILER_LLVM_H |
10 | |
11 | /* Other compilers that emulate this one need to be detected first. */ |
12 | |
13 | #include <boost/predef/compiler/clang.h> |
14 | |
15 | #include <boost/predef/version_number.h> |
16 | #include <boost/predef/make.h> |
17 | |
18 | /* tag::reference[] |
19 | = `BOOST_COMP_LLVM` |
20 | |
21 | http://en.wikipedia.org/wiki/LLVM[LLVM] compiler. |
22 | |
23 | [options="header"] |
24 | |=== |
25 | | {predef_symbol} | {predef_version} |
26 | |
27 | | `+__llvm__+` | {predef_detection} |
28 | |=== |
29 | */ // end::reference[] |
30 | |
31 | #define BOOST_COMP_LLVM BOOST_VERSION_NUMBER_NOT_AVAILABLE |
32 | |
33 | #if defined(__llvm__) |
34 | # define BOOST_COMP_LLVM_DETECTION BOOST_VERSION_NUMBER_AVAILABLE |
35 | #endif |
36 | |
37 | #ifdef BOOST_COMP_LLVM_DETECTION |
38 | # if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) |
39 | # define BOOST_COMP_LLVM_EMULATED BOOST_COMP_LLVM_DETECTION |
40 | # else |
41 | # undef BOOST_COMP_LLVM |
42 | # define BOOST_COMP_LLVM BOOST_COMP_LLVM_DETECTION |
43 | # endif |
44 | # define BOOST_COMP_LLVM_AVAILABLE |
45 | # include <boost/predef/detail/comp_detected.h> |
46 | #endif |
47 | |
48 | #define BOOST_COMP_LLVM_NAME "LLVM" |
49 | |
50 | #endif |
51 | |
52 | #include <boost/predef/detail/test.h> |
53 | BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_LLVM,BOOST_COMP_LLVM_NAME) |
54 | |
55 | #ifdef BOOST_COMP_LLVM_EMULATED |
56 | #include <boost/predef/detail/test.h> |
57 | BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_LLVM_EMULATED,BOOST_COMP_LLVM_NAME) |
58 | #endif |
59 | |