diff options
| author | Eric Fiselier <eric@efcs.ca> | 2017-01-07 02:43:58 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2017-01-07 02:43:58 +0000 |
| commit | 330fe0170f5189e58a7680aee5d57d75f031b28e (patch) | |
| tree | 1dcf2f7cef8ee30d8b8fa1eb527f85f213fb38ab | |
| parent | 1b97fc34a4727c8d8cc27b5637a5c36db3a3ef49 (diff) | |
| download | bcm5719-llvm-330fe0170f5189e58a7680aee5d57d75f031b28e.tar.gz bcm5719-llvm-330fe0170f5189e58a7680aee5d57d75f031b28e.zip | |
Add _LIBCPP_ABI_[ITANIUM|MICROSOFT] macros.
This patch adds a libc++ configuration macro for the ABI we
are targeting, either Itanium or Microsoft. For now we configure
for the Microsoft ABI when on Windows with a compiler that defines
_MSC_VER. However this is only temporary until Clang implements
builtin macros we can use.
llvm-svn: 291329
| -rw-r--r-- | libcxx/include/__config | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index a05bd9228b8..b0e585facf7 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -111,6 +111,15 @@ #define _LIBCPP_COMPILER_IBM #endif +// FIXME: ABI detection should be done via compiler builtin macros. This +// is just a placeholder until Clang implements such macros. For now assume +// that Windows compilers pretending to be MSVC++ target the microsoft ABI. +#if defined(_WIN32) && defined(_MSC_VER) +# define _LIBCPP_ABI_MICROSOFT +#else +# define _LIBCPP_ABI_ITANIUM +#endif + // Need to detect which libc we're using if we're on Linux. #if defined(__linux__) #include <features.h> |

