Skip to content

Commit 1fa0f4b

Browse files
committed
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
1 parent fee855b commit 1fa0f4b

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

libcxx/include/__config

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@
3434

3535
#define _LIBCPP_VERSION 9000
3636

37-
#ifndef _LIBCPP_ABI_VERSION
38-
# define _LIBCPP_ABI_VERSION 1
39-
#endif
40-
4137
#ifndef __STDC_HOSTED__
4238
# define _LIBCPP_FREESTANDING
4339
#endif
@@ -66,7 +62,18 @@
6662
# error Unknown object file format
6763
#endif
6864

69-
#if defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2
65+
#if defined(_LIBCPP_ABI_UNSTABLE)
66+
# ifdef _LIBCPP_ABI_VERSION
67+
# error _LIBCPP_ABI_VERSION cannot be defined with _LIBCPP_ABI_UNSTABLE
68+
# endif
69+
# define _LIBCPP_ABI_VERSION _LIBCPP_VERSION
70+
#endif
71+
72+
#ifndef _LIBCPP_ABI_VERSION
73+
# define _LIBCPP_ABI_VERSION 1
74+
#endif
75+
76+
#if _LIBCPP_ABI_VERSION >= 2
7077
// Change short string representation so that string data starts at offset 0,
7178
// improving its alignment in some cases.
7279
# define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT

0 commit comments

Comments
 (0)