[libcxx] r299290 - string: Remove always_inline from basic_string::__init

Duncan P. N. Exon Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 31 20:20:49 PDT 2017


Author: dexonsmith
Date: Fri Mar 31 22:20:48 2017
New Revision: 299290

URL: http://llvm.org/viewvc/llvm-project?rev=299290&view=rev
Log:
string: Remove always_inline from basic_string::__init

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

Modified:
    libcxx/trunk/include/string

Modified: libcxx/trunk/include/string
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=299290&r1=299289&r2=299290&view=diff
==============================================================================
--- libcxx/trunk/include/string (original)
+++ libcxx/trunk/include/string Fri Mar 31 22:20:48 2017
@@ -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,




More information about the cfe-commits mailing list