libcxx: Define set_unexpected, _get_unexpected and __uncaught_exceptions without...
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 18 Jan 2018 00:33:35 +0000 (00:33 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 18 Jan 2018 00:33:35 +0000 (00:33 +0000)
It turns out that the MSVC headers define these functions without
dllimport even when compiling with /MD. This change fixes the resulting
compile-time error.

Differential Revision: https://reviews.llvm.org/D42207

llvm-svn: 322794

libcxx/src/support/runtime/exception_msvc.ipp

index 7dc1b57..854d386 100644 (file)
@@ -22,11 +22,11 @@ _LIBCPP_CRT_FUNC terminate_handler __cdecl set_terminate(
 _LIBCPP_CRT_FUNC terminate_handler __cdecl _get_terminate();
 
 typedef void (__cdecl* unexpected_handler)();
-_LIBCPP_CRT_FUNC unexpected_handler __cdecl set_unexpected(
+unexpected_handler __cdecl set_unexpected(
     unexpected_handler _NewUnexpectedHandler) throw();
-_LIBCPP_CRT_FUNC unexpected_handler __cdecl _get_unexpected();
+unexpected_handler __cdecl _get_unexpected();
 
-_LIBCPP_CRT_FUNC int __cdecl __uncaught_exceptions();
+int __cdecl __uncaught_exceptions();
 }
 
 namespace std {