summaryrefslogtreecommitdiffstats
path: root/libcxx/include/string
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2017-06-29 02:52:46 +0000
committerShoaib Meenai <smeenai@fb.com>2017-06-29 02:52:46 +0000
commit8e07cadde0ba53385afd4762af3a12412609483b (patch)
tree2d6d28f068c319a216b8bca3243540fa1e5c8949 /libcxx/include/string
parentd16a61d2c84b73144f232dcd75b6c5e03f9f898c (diff)
downloadbcm5719-llvm-8e07cadde0ba53385afd4762af3a12412609483b.tar.gz
bcm5719-llvm-8e07cadde0ba53385afd4762af3a12412609483b.zip
[libc++] Hoist explicit instantiation above implicit. NFC
The string literal operators have implicit instantiations of basic_string<char> and basic_string<wchar>, which prevent the dllimport on the subsequent explicit instantiation declarations from having an effect. Hoisting the explicit instantiations above the implicit ones fixes the issue. I think it's pretty unfortunate that the ordering has such an effect, and I'd fixed the same issue for dllexport in r288682. dllimport is more complicated from a codegen perspective, however, and clang's behavior of ignoring the dllimport when there's a previous implicit instantiation is consistent with cl, so changing the order is our only recourse. llvm-svn: 306632
Diffstat (limited to 'libcxx/include/string')
-rw-r--r--libcxx/include/string8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcxx/include/string b/libcxx/include/string
index accf1ce2771..d1a3a1f8e6c 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -4004,6 +4004,10 @@ basic_string<_CharT, _Traits, _Allocator>::__subscriptable(const const_iterator*
#endif // _LIBCPP_DEBUG_LEVEL >= 2
+_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string<char>)
+_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string<wchar_t>)
+_LIBCPP_EXTERN_TEMPLATE(string operator+<char, char_traits<char>, allocator<char> >(char const*, string const&))
+
#if _LIBCPP_STD_VER > 11
// Literal suffixes for basic_string [basic.string.literals]
inline namespace literals
@@ -4037,10 +4041,6 @@ inline namespace literals
}
#endif
-_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string<char>)
-_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_string<wchar_t>)
-_LIBCPP_EXTERN_TEMPLATE(string operator+<char, char_traits<char>, allocator<char> >(char const*, string const&))
-
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
OpenPOWER on IntegriCloud