diff options
| author | Eric Fiselier <eric@efcs.ca> | 2019-06-25 22:13:39 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2019-06-25 22:13:39 +0000 |
| commit | 1fa0f4b94241d2e6f9f88262f73237ba2650cf2a (patch) | |
| tree | 682f52f86157ad856eeb1a92f8b35cf65bd8ba40 /libcxx/include/__config | |
| parent | fee855b5bc1abe1f3f89e977ce4c81cf9bdbc2e4 (diff) | |
| download | bcm5719-llvm-1fa0f4b94241d2e6f9f88262f73237ba2650cf2a.tar.gz bcm5719-llvm-1fa0f4b94241d2e6f9f88262f73237ba2650cf2a.zip | |
Change the ABI version and ABI namespace to be `_LIBCPP_VERSION`
when _LIBCPP_ABI_UNSTABLE is defined.
User defined _LIBCPP_ABI_NAMESPACE will still be respected,
but the default version namespace in unstable mode will be the libc++ version
(Currently '__9000').
Previously `_LIBCPP_ABI_VERSION` and `_LIBCPP_ABI_NAMESPACE` were
`1` and `__1` respectively, whuch conflicted with the stable ABI
llvm-svn: 364354
Diffstat (limited to 'libcxx/include/__config')
| -rw-r--r-- | libcxx/include/__config | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index 5eb69b4e93a..54d4672afd0 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -34,10 +34,6 @@ #define _LIBCPP_VERSION 9000 -#ifndef _LIBCPP_ABI_VERSION -# define _LIBCPP_ABI_VERSION 1 -#endif - #ifndef __STDC_HOSTED__ # define _LIBCPP_FREESTANDING #endif @@ -66,7 +62,18 @@ # error Unknown object file format #endif -#if defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2 +#if defined(_LIBCPP_ABI_UNSTABLE) +# ifdef _LIBCPP_ABI_VERSION +# error _LIBCPP_ABI_VERSION cannot be defined with _LIBCPP_ABI_UNSTABLE +# endif +# define _LIBCPP_ABI_VERSION _LIBCPP_VERSION +#endif + +#ifndef _LIBCPP_ABI_VERSION +# define _LIBCPP_ABI_VERSION 1 +#endif + +#if _LIBCPP_ABI_VERSION >= 2 // Change short string representation so that string data starts at offset 0, // improving its alignment in some cases. # define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT |

