summaryrefslogtreecommitdiffstats
path: root/libcxx/include
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-01-16 21:01:00 +0000
committerEric Fiselier <eric@efcs.ca>2017-01-16 21:01:00 +0000
commitfc26379a843ab23db0a637636423e9cb49747b2b (patch)
treedbf8d14a6afecda85bf7eb4d954ede11fd7dede0 /libcxx/include
parent1cd196e7b46e49d170a4b4013879a577dee59cb2 (diff)
downloadbcm5719-llvm-fc26379a843ab23db0a637636423e9cb49747b2b.tar.gz
bcm5719-llvm-fc26379a843ab23db0a637636423e9cb49747b2b.zip
[libc++] Introduce _LIBCPP_EXTERN_VIS to fix __libcpp_debug_function link errors
Summary: On Windows tests that use `_LIBCPP_ASSERT` fail to link because the assertion handler function isn't correctly exported from the libc++ dylib. This patch fixes the dll import/export issues by introducing a new visibility macro `_LIBCPP_EXTERN_VIS` for use on external variables. Reviewers: compnerd, smeenai, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28728 llvm-svn: 292158
Diffstat (limited to 'libcxx/include')
-rw-r--r--libcxx/include/__config5
-rw-r--r--libcxx/include/__debug2
2 files changed, 6 insertions, 1 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 118e3bde24d..d7ecdcfc9cd 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -583,6 +583,7 @@ namespace std {
#define _LIBCPP_TYPE_VIS _LIBCPP_DLL_VIS
#define _LIBCPP_FUNC_VIS _LIBCPP_DLL_VIS
+#define _LIBCPP_EXTERN_VIS _LIBCPP_DLL_VIS
#define _LIBCPP_EXCEPTION_ABI _LIBCPP_DLL_VIS
#define _LIBCPP_HIDDEN
#define _LIBCPP_TEMPLATE_VIS
@@ -636,6 +637,10 @@ namespace std {
# define _LIBCPP_FUNC_VIS_ONLY _LIBCPP_FUNC_VIS
#endif
+#ifndef _LIBCPP_EXTERN_VIS
+# define _LIBCPP_EXTERN_VIS
+#endif
+
#ifndef _LIBCPP_OVERRIDABLE_FUNC_VIS
# define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_FUNC_VIS
#endif
diff --git a/libcxx/include/__debug b/libcxx/include/__debug
index d95e339310d..d01bacdf7ed 100644
--- a/libcxx/include/__debug
+++ b/libcxx/include/__debug
@@ -74,7 +74,7 @@ typedef void(*__libcpp_debug_function_type)(__libcpp_debug_info const&);
/// __libcpp_debug_function - The handler function called when a _LIBCPP_ASSERT
/// fails.
-extern __libcpp_debug_function_type __libcpp_debug_function;
+extern _LIBCPP_EXTERN_VIS __libcpp_debug_function_type __libcpp_debug_function;
/// __libcpp_abort_debug_function - A debug handler that aborts when called.
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
OpenPOWER on IntegriCloud