Provide a way to disable use of extern templates in libc++. This is intended for the clients of libc++, not the libc++ build. The dylib should always contain the extern templates. To disable the client needs to put -D'_LIBCPP_EXTERN_TEMPLATE(...)=' on the command line.
llvm-svn: 167486
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: cd47cbc7a44604a65d3ef391822a32b79b2f61e4
diff --git a/include/valarray b/include/valarray
index 4091d0f..c56dd12 100644
--- a/include/valarray
+++ b/include/valarray
@@ -4770,9 +4770,9 @@
return __v.__end_;
}
-extern template valarray<size_t>::valarray(size_t);
-extern template valarray<size_t>::~valarray();
-extern template void valarray<size_t>::resize(size_t, size_t);
+_LIBCPP_EXTERN_TEMPLATE(valarray<size_t>::valarray(size_t))
+_LIBCPP_EXTERN_TEMPLATE(valarray<size_t>::~valarray())
+_LIBCPP_EXTERN_TEMPLATE(void valarray<size_t>::resize(size_t, size_t))
_LIBCPP_END_NAMESPACE_STD