From 53a420fba21cf1644972b34dcd811a43cdb8368d Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 2 Jan 2017 19:18:58 +0000 Subject: Vendor import of libc++ trunk r290819: https://llvm.org/svn/llvm-project/libcxx/trunk@290819 --- include/exception | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) (limited to 'include/exception') diff --git a/include/exception b/include/exception index 186d379f08f5..98e1f37f919e 100644 --- a/include/exception +++ b/include/exception @@ -79,11 +79,8 @@ template void rethrow_if_nested(const E& e); #include <__config> #include -#include -#if defined(_LIBCPP_NO_EXCEPTIONS) -#include #include -#endif +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -165,7 +162,10 @@ make_exception_ptr(_Ep __e) _NOEXCEPT { return current_exception(); } -#endif // _LIBCPP_NO_EXCEPTIONS +#else + ((void)__e); + _VSTD::abort(); +#endif } // nested_exception @@ -209,6 +209,9 @@ throw_with_nested (_Tp& __t, typename enable_if< { #ifndef _LIBCPP_NO_EXCEPTIONS throw __nested::type>(_VSTD::forward<_Tp>(__t)); +#else + ((void)__t); + // FIXME: Make this abort. #endif } @@ -229,6 +232,9 @@ throw_with_nested (_Tp& __t, typename enable_if< { #ifndef _LIBCPP_NO_EXCEPTIONS throw _VSTD::forward<_Tp>(__t); +#else + ((void)__t); + // FIXME: Make this abort #endif } @@ -255,19 +261,4 @@ rethrow_if_nested(const _Ep&, typename enable_if< } // std -_LIBCPP_BEGIN_NAMESPACE_STD - -template -_LIBCPP_INLINE_VISIBILITY -inline void __libcpp_throw(_Exception const& __e) { -#ifndef _LIBCPP_NO_EXCEPTIONS - throw __e; -#else - _VSTD::fprintf(stderr, "%s\n", __e.what()); - _VSTD::abort(); -#endif -} - -_LIBCPP_END_NAMESPACE_STD - #endif // _LIBCPP_EXCEPTION -- cgit v1.3