[PATCH] D28442: [libc++] Implement terminate(), unexpected() and uncaught_exceptions() on Windows

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 6 22:31:29 PST 2017


smeenai accepted this revision.
smeenai added a comment.
This revision is now accepted and ready to land.

Hooray for Microsoft for putting all these in msvcrt (their **C** runtime library) instead of msvcprt (their C++ runtime library), I guess :p



================
Comment at: src/exception.cpp:53
+#if defined(_LIBCPP_ABI_MICROSOFT)
+  return ::set_unexpected(func);
+#else
----------------
MSDN says "unexpected is not used in the current C++ exception-handling implementation", which is maybe not the most desirable thing in the world, but I guess this is going away in C++17 anyway :D


================
Comment at: src/exception.cpp:139
+#elif defined(_LIBCPP_ABI_MICROSOFT)
+    return __uncaught_exceptions();
+#else
----------------
Yay undocumented APIs (at least as far as I can see).


https://reviews.llvm.org/D28442





More information about the cfe-commits mailing list