summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/include/__config4
-rw-r--r--libcxx/include/system_error3
-rw-r--r--libcxx/src/system_error.cpp2
3 files changed, 8 insertions, 1 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config
index ac46979e342..7b175a15912 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -53,6 +53,10 @@
// of nullptr_t. This option is ABI incompatible with GCC in C++03 mode.
#define _LIBCPP_ABI_ALWAYS_USE_CXX11_NULLPTR
#elif _LIBCPP_ABI_VERSION == 1
+#if !defined(_WIN32)
+// Enable compiling a definition of error_category() into the libc++ dylib.
+#define _LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR
+#endif
// Feature macros for disabling pre ABI v1 features. All of these options
// are deprecated.
#if defined(__FreeBSD__)
diff --git a/libcxx/include/system_error b/libcxx/include/system_error
index c7e73d4ab82..58040639d3e 100644
--- a/libcxx/include/system_error
+++ b/libcxx/include/system_error
@@ -384,7 +384,8 @@ class _LIBCPP_TYPE_VIS error_category
public:
virtual ~error_category() _NOEXCEPT;
-#ifdef _LIBCPP_BUILDING_SYSTEM_ERROR
+#if defined(_LIBCPP_BUILDING_SYSTEM_ERROR) && \
+ defined(_LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR)
error_category() _NOEXCEPT;
#else
_LIBCPP_ALWAYS_INLINE
diff --git a/libcxx/src/system_error.cpp b/libcxx/src/system_error.cpp
index 3a2255425f0..4ecafeaa3b8 100644
--- a/libcxx/src/system_error.cpp
+++ b/libcxx/src/system_error.cpp
@@ -29,9 +29,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// class error_category
+#if defined(_LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR)
error_category::error_category() _NOEXCEPT
{
}
+#endif
error_category::~error_category() _NOEXCEPT
{
OpenPOWER on IntegriCloud