diff options
Diffstat (limited to 'contrib/libc++/include/exception')
-rw-r--r-- | contrib/libc++/include/exception | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/contrib/libc++/include/exception b/contrib/libc++/include/exception index 186d379..98e1f37 100644 --- a/contrib/libc++/include/exception +++ b/contrib/libc++/include/exception @@ -79,11 +79,8 @@ template <class E> void rethrow_if_nested(const E& e); #include <__config> #include <cstddef> -#include <type_traits> -#if defined(_LIBCPP_NO_EXCEPTIONS) -#include <cstdio> #include <cstdlib> -#endif +#include <type_traits> #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<typename remove_reference<_Tp>::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 <class _Exception> -_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 |