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
This commit is contained in:
Eric Fiselier
2016-09-16 00:13:55 +00:00
parent 03f7d10810
commit b6a049fce5

View File

@@ -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<value_type>& __ga);
valarray(const mask_array<value_type>& __ma);
valarray(const indirect_array<value_type>& __ia);
inline _LIBCPP_INLINE_VISIBILITY
inline _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY
~valarray();
// assignment: