Make make_exception_ptr abort with -fno-exceptions
llvm-svn: 288575
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 613dc646d3f4cc262a2db098da6f94f9d416142b
diff --git a/include/exception b/include/exception
index 686e4ec..d8b8cce 100644
--- a/include/exception
+++ b/include/exception
@@ -79,6 +79,7 @@
#include <__config>
#include <cstddef>
+#include <cstdlib>
#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -161,7 +162,9 @@
{
return current_exception();
}
-#endif // _LIBCPP_NO_EXCEPTIONS
+#else
+ _VSTD::abort();
+#endif
}
// nested_exception