string: Remove always_inline from basic_string::__init
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 1 Apr 2017 03:20:48 +0000 (03:20 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 1 Apr 2017 03:20:48 +0000 (03:20 +0000)
This is effectively a partial revert of r278356, which started inlining
basic_string::__init.  Even if we want to help the compiler along with
an inlinehint, we shouldn't hamstring it by forcing it to inline all the
time.

Libc++ uses always_inline widely as a limit-the-ABI-hack, but since
__init is already on the dylib boundary, it makes no sense here and just
harms the debugging experience at -O0.

rdar://problem/31013102

llvm-svn: 299290

libcxx/include/string

index 714ff84..574311c 100644 (file)
@@ -1338,15 +1338,15 @@ private:
                  __align_it<sizeof(value_type) < __alignment ?
                             __alignment/sizeof(value_type) : 1 > (__s+1)) - 1;}
 
-    inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
+    inline
     void __init(const value_type* __s, size_type __sz, size_type __reserve);
-    inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
+    inline
     void __init(const value_type* __s, size_type __sz);
-    inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
+    inline
     void __init(size_type __n, value_type __c);
 
     template <class _InputIterator>
-    inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
+    inline
     typename enable_if
     <
         __is_exactly_input_iterator<_InputIterator>::value,
@@ -1355,7 +1355,7 @@ private:
     __init(_InputIterator __first, _InputIterator __last);
 
     template <class _ForwardIterator>
-    inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
+    inline
     typename enable_if
     <
         __is_forward_iterator<_ForwardIterator>::value,