[PATCH] D42207: libcxx: Define set_unexpected, _get_unexpected and __uncaught_exceptions without dllimport.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 15:33:10 PST 2018


pcc created this revision.
pcc added reviewers: smeenai, compnerd.
Herald added a reviewer: EricWF.
Herald added a reviewer: EricWF.

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.


https://reviews.llvm.org/D42207

Files:
  libcxx/src/support/runtime/exception_msvc.ipp


Index: libcxx/src/support/runtime/exception_msvc.ipp
===================================================================
--- libcxx/src/support/runtime/exception_msvc.ipp
+++ libcxx/src/support/runtime/exception_msvc.ipp
@@ -22,11 +22,11 @@
 _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 {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42207.130299.patch
Type: text/x-patch
Size: 741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180117/6d3e672b/attachment.bin>


More information about the llvm-commits mailing list