Turn off extern templates for most uses. It is causing more problems than it is worth. The extern templates will still be built into the dylib, mainly for ABI stability purposes. And the client can still turn these back on with a #define if desire. This fixes http://llvm.org/bugs/show_bug.cgi?id=17027. However there's no associated test for the test suite because http://llvm.org/bugs/show_bug.cgi?id=17027 needs mismatched dylib and headers to fire.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189610 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/src/algorithm.cpp b/src/algorithm.cpp
index 6d5cf7c..10c4c33 100644
--- a/src/algorithm.cpp
+++ b/src/algorithm.cpp
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
#include "algorithm"
#include "random"
#include "mutex"
diff --git a/src/ios.cpp b/src/ios.cpp
index 732a61b..754c2c9 100644
--- a/src/ios.cpp
+++ b/src/ios.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
+
#include "ios"
#include "streambuf"
#include "istream"
diff --git a/src/locale.cpp b/src/locale.cpp
index ac19521..49ffd8e 100644
--- a/src/locale.cpp
+++ b/src/locale.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
+
// On Solaris, we need to define something to make the C99 parts of localeconv
// visible.
#ifdef __sun__
diff --git a/src/string.cpp b/src/string.cpp
index 5a86911..a668583 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
+
#include "string"
#include "cstdlib"
#include "cwchar"
diff --git a/src/valarray.cpp b/src/valarray.cpp
index 2d8db52..e4c9ed0 100644
--- a/src/valarray.cpp
+++ b/src/valarray.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
+
#include "valarray"
_LIBCPP_BEGIN_NAMESPACE_STD