diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-04-25 21:31:58 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-04-25 21:31:58 +0000 |
commit | de329354aa37aea0fcf06e5bb88f40b73717956c (patch) | |
tree | 0e886cc3e381aec8c0d5c51f6bbae514ab573bc4 | |
parent | e008be2b0723f982cb53c4f9af3e97d608e001bc (diff) | |
download | bcm5719-llvm-de329354aa37aea0fcf06e5bb88f40b73717956c.tar.gz bcm5719-llvm-de329354aa37aea0fcf06e5bb88f40b73717956c.zip |
Remove incorrect explicit instantiation declarations for valarray
libc++ ABI v1 provides three valarray symbols as part of the shared library:
valarray<size_t>::valarray(size_t)
valarray<size_t>::~valarray()
valarray<size_t>::resize(size_t, size_t)
The first two of these are intended to be removed in V2 of the ABI: they're
attributed _LIBCPP_HIDE_FROM_ABI_AFTER_V1, and it appears that the intention
is that these symbols from the library are not used even when building using
the V1 ABI. However, there are explicit instantiation declarations for all
three symbols in the header, which are not correct as we do not intend to find
an instantiation of these functions that is provided elsewhere.
(A recent change to clang to properly diagnose explicit instantiation
declarations of internal linkage functions -- required by [temp.explicit]p13 --
had to be rolled back because it diagnosed these explicit instantiations.)
Remove the explicit instantiation declarations, and remove the explicit
instantiation definitions for V2 of the libc++ ABI onwards.
llvm-svn: 359243
-rw-r--r-- | libcxx/include/valarray | 2 | ||||
-rw-r--r-- | libcxx/lib/abi/x86_64-apple-darwin.v2.abilist | 4 | ||||
-rw-r--r-- | libcxx/src/valarray.cpp | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/libcxx/include/valarray b/libcxx/include/valarray index 1c4875efad3..8f6221ab3f3 100644 --- a/libcxx/include/valarray +++ b/libcxx/include/valarray @@ -1059,8 +1059,6 @@ private: valarray& __assign_range(const value_type* __f, const value_type* __l); }; -_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS valarray<size_t>::valarray(size_t)) -_LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS valarray<size_t>::~valarray()) _LIBCPP_EXTERN_TEMPLATE(_LIBCPP_FUNC_VIS void valarray<size_t>::resize(size_t, size_t)) template <class _Op, class _Tp> diff --git a/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist b/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist index 6de64ef5dec..87258c53e09 100644 --- a/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist +++ b/libcxx/lib/abi/x86_64-apple-darwin.v2.abilist @@ -1380,10 +1380,6 @@ {'is_defined': True, 'name': '__ZNSt3__28time_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEE2idE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZNSt3__28time_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEE2idE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZNSt3__28valarrayImE6resizeEmm', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__28valarrayImEC1Em', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__28valarrayImEC2Em', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__28valarrayImED1Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__28valarrayImED2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__29__num_getIcE17__stage2_int_loopEciPcRS2_RjcRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSD_PKc', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__29__num_getIcE17__stage2_int_prepERNS_8ios_baseERc', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__29__num_getIcE19__stage2_float_loopEcRbRcPcRS4_ccRKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEPjRSE_RjS4_', 'type': 'FUNC'} diff --git a/libcxx/src/valarray.cpp b/libcxx/src/valarray.cpp index 893de050fc6..7bf0b417588 100644 --- a/libcxx/src/valarray.cpp +++ b/libcxx/src/valarray.cpp @@ -10,8 +10,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD +// These two symbols are part of the v1 ABI but not part of the >=v2 ABI. +#if _LIBCPP_ABI_VERSION == 1 template valarray<size_t>::valarray(size_t); template valarray<size_t>::~valarray(); +#endif + template void valarray<size_t>::resize(size_t, size_t); void |