Sfoglia il codice sorgente

Revert r282345 - Use __attribute__((internal_linkage)) when available.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284101 91177308-0d34-0410-b5e6-96231b3b80d8
Eric Fiselier 8 anni fa
parent
commit
a469f83b26
2 ha cambiato i file con 2 aggiunte e 35 eliminazioni
  1. 2 12
      include/__config
  2. 0 23
      src/string.cpp

+ 2 - 12
include/__config

@@ -34,7 +34,6 @@
 #endif
 #endif
 
 
 #if defined(_LIBCPP_ABI_UNSTABLE) || _LIBCPP_ABI_VERSION >= 2
 #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,
 // Change short string representation so that string data starts at offset 0,
 // improving its alignment in some cases.
 // improving its alignment in some cases.
 #define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
 #define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
@@ -50,7 +49,6 @@
 #define _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
 #define _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
 #define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
 #define _LIBCPP_ABI_VARIADIC_LOCK_GUARD
 #elif _LIBCPP_ABI_VERSION == 1
 #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
 // Feature macros for disabling pre ABI v1 features. All of these options
 // are deprecated.
 // are deprecated.
 #if defined(__FreeBSD__)
 #if defined(__FreeBSD__)
@@ -603,19 +601,11 @@ namespace std {
 #endif
 #endif
 
 
 #ifndef _LIBCPP_INLINE_VISIBILITY
 #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
 #endif
 
 
 #ifndef _LIBCPP_ALWAYS_INLINE
 #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
 #endif
 
 
 #ifndef _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
 #ifndef _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY

+ 0 - 23
src/string.cpp

@@ -29,29 +29,6 @@ template
     string
     string
     operator+<char, char_traits<char>, allocator<char> >(char const*, string const&);
     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
 namespace
 {
 {