From b6a049fce50dec77a0a24211debc143a8e0588c4 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Fri, 16 Sep 2016 00:13:55 +0000 Subject: [PATCH] Use _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY in valarray to support attribute((internal_linkage)). The externally instantiated member functions must be declared using _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY, not _LIBCPP_INLINE_VISIBILITY, in order to be properly exported when using __attribute__((internal_linkage)). Otherwise the explicit instantiations will obviously have internal linkage and will not be exported from the dylib. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@281684 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/valarray | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/valarray b/include/valarray index bde644e87..2325c54f7 100644 --- a/include/valarray +++ b/include/valarray @@ -802,8 +802,8 @@ public: // construct/destroy: _LIBCPP_INLINE_VISIBILITY valarray() : __begin_(0), __end_(0) {} - _LIBCPP_INLINE_VISIBILITY - inline explicit valarray(size_t __n); + inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY + explicit valarray(size_t __n); _LIBCPP_INLINE_VISIBILITY valarray(const value_type& __x, size_t __n); valarray(const value_type* __p, size_t __n); @@ -819,7 +819,7 @@ public: valarray(const gslice_array& __ga); valarray(const mask_array& __ma); valarray(const indirect_array& __ia); - inline _LIBCPP_INLINE_VISIBILITY + inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY ~valarray(); // assignment: