[libcxx] r284101 - Revert r282345 - Use __attribute__((internal_linkage)) when available.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 12 21:07:58 PDT 2016
Author: ericwf
Date: Wed Oct 12 23:07:58 2016
New Revision: 284101
URL: http://llvm.org/viewvc/llvm-project?rev=284101&view=rev
Log:
Revert r282345 - Use __attribute__((internal_linkage)) when available.
Modified:
libcxx/trunk/include/__config
libcxx/trunk/src/string.cpp
Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=284101&r1=284100&r2=284101&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Wed Oct 12 23:07:58 2016
@@ -34,7 +34,6 @@
#endif
#if defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2
-#define _LIBCPP_ABI_EXTERN_TEMPLATE_SYMBOLS_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
@@ -50,7 +49,6 @@
#define _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
#define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
#elif _LIBCPP_ABI_VERSION == 1
-#define _LIBCPP_ABI_EXTERN_TEMPLATE_SYMBOLS_VERSION 1
// Feature macros for disabling pre ABI v1 features. All of these options
// are deprecated.
#if defined(__FreeBSD__)
@@ -603,19 +601,11 @@ namespace std {
#endif
#ifndef _LIBCPP_INLINE_VISIBILITY
-# if __has_attribute(__internal_linkage__)
-# define _LIBCPP_INLINE_VISIBILITY __attribute__((__internal_linkage__, __always_inline__))
-# else
-# define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__))
-# endif
+#define _LIBCPP_INLINE_VISIBILITY __attribute__ ((__visibility__("hidden"), __always_inline__))
#endif
#ifndef _LIBCPP_ALWAYS_INLINE
-# if __has_attribute(__internal_linkage__)
-# define _LIBCPP_ALWAYS_INLINE __attribute__((__internal_linkage__, __always_inline__))
-# else
-# define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__))
-# endif
+#define _LIBCPP_ALWAYS_INLINE __attribute__ ((__visibility__("hidden"), __always_inline__))
#endif
#ifndef _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
Modified: libcxx/trunk/src/string.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/string.cpp?rev=284101&r1=284100&r2=284101&view=diff
==============================================================================
--- libcxx/trunk/src/string.cpp (original)
+++ libcxx/trunk/src/string.cpp Wed Oct 12 23:07:58 2016
@@ -29,29 +29,6 @@ template
string
operator+<char, char_traits<char>, allocator<char> >(char const*, string const&);
-// These external instantiations are required to maintain dylib compatibility
-// for ABI v1 when using __attribute__((internal_linkage)) as opposed to
-// __attribute__((visibility("hidden"), always_inline)).
-#if _LIBCPP_ABI_EXTERN_TEMPLATE_SYMBOLS_VERSION == 1
-template basic_string<char>::iterator
-basic_string<char>::insert(basic_string<char>::const_iterator,
- char const *, char const *);
-
-template basic_string<wchar_t>::iterator
-basic_string<wchar_t>::insert(basic_string<wchar_t>::const_iterator,
- wchar_t const *, wchar_t const *);
-
-template basic_string<char> &
-basic_string<char>::replace(basic_string<char>::const_iterator,
- basic_string<char>::const_iterator,
- char const *, char const *);
-
-template basic_string<wchar_t> &
-basic_string<wchar_t>::replace(basic_string<wchar_t>::const_iterator,
- basic_string<wchar_t>::const_iterator,
- wchar_t const *, wchar_t const *);
-#endif // _LIBCPP_ABI_EXTERN_TEMPLATE_SYMBOLS_VERSION
-
namespace
{
More information about the cfe-commits
mailing list