You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[libc++] Introduce a new attribute keyword for Clang improves compatibility with Mingw-GCC
In MinGW environment, Clang handles dllexport attribute of internal
class that defined in class template in different way from GCC.
This incompatibility should be fixed but breaks ABI of libc++, so
introduce a new keyword to keep ABI in MinGW environment with
old and patched Clang and to stay ABI compatible on other platforms.
This attribute is attached only for basic_ostream::sentry::sentry,
basic_ostream::sentry::~sentry and basic_istream::sentry::sentry.
Other entities won't be affected by patching Clang so doesn't need
to be annotate.
At a time to introduce a new class as a non-template inner type of
a class template, all non-inline member functions of that class
also needs to be attached _LIBCPP_HIDE_FROM_ABI_MINGW_OR_AFTER_V1
or _LIBCPP_HIDE_FROM_ABI, not _LIBCPP_HIDE_FROM_ABI_AFTER_V1.
Otherwise, that member functions contained in DLL will be
inaccessible on MinGW environment.
For time to increase ABI version, _LIBCPP_HIDE_FROM_ABI_MINGW_OR_AFTER_V1
can be simply replaced to _LIBCPP_HIDE_FROM_ABI_AFTER_V1.
0 commit comments