Revert r280944 - Added 'inline' attribute to basic_string's destructor

This patch causes a couple of issues:

1) It triggers http://llvm.org/PR30341. Although the bug is not truly a libc++
bug it breaks the LLVM build using libc++. Reverting this patch is only
a temporary workaround until Clang is fixed.

2) It adds yet another ABI incompatibility when libc++.so is compiled with GCC.
Specifically GCC doesn't ignore the _LIBCPP_INLINE_VISIBILITY on the out-of-line
definition when compiling the dylib. This causes the externally instantiated
~basic_string symbol to have hidden visibility.

This patch should be recommitted after addressing (1) and (2). (2) can be fixed
by adding _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY which is defined as
__attribute__((visibility("default"), always_inline)) as opposed to
_LIBCPP_INLINE_VISIBILITY which makes the symbol hidden.

llvm-svn: 281562
This commit is contained in:
Eric Fiselier 2016-09-14 23:52:01 +00:00
parent 9efb1bdcc4
commit a75c1bf9f6
1 changed files with 0 additions and 1 deletions

View File

@ -1798,7 +1798,6 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(initializer_list<value_t
#endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS
template <class _CharT, class _Traits, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
basic_string<_CharT, _Traits, _Allocator>::~basic_string()
{
#if _LIBCPP_DEBUG_LEVEL >= 2