[PATCH] D31564: string: Remove always_inline from basic_string::__init
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 31 19:26:08 PDT 2017
dexonsmith created this revision.
Herald added subscribers: rengolin, aemerson.
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.
https://reviews.llvm.org/D31564
Files:
libcxx/include/string
Index: libcxx/include/string
===================================================================
--- libcxx/include/string
+++ libcxx/include/string
@@ -1338,24 +1338,24 @@
__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,
void
>::type
__init(_InputIterator __first, _InputIterator __last);
template <class _ForwardIterator>
- inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
+ inline
typename enable_if
<
__is_forward_iterator<_ForwardIterator>::value,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31564.93738.patch
Type: text/x-patch
Size: 1181 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170401/7b775344/attachment.bin>
More information about the cfe-commits
mailing list