These calls were added in D141222.
Reviewed By: #libc, ldionne
Spies: ldionne, libcxx-commits, smeenai, mikhail.ramalho
Differential Revision: https://reviews.llvm.org/D146227
throw bad_expected_access<_Err>(std::forward<_Arg>(__arg));
# else
(void)__arg;
- std::__libcpp_verbose_abort("bad_expected_access was thrown in -fno-exceptions mode");
+ _LIBCPP_VERBOSE_ABORT("bad_expected_access was thrown in -fno-exceptions mode");
# endif
}
}
#else
void __throw_filesystem_error(_Args&&...) {
- std::__libcpp_verbose_abort("filesystem_error was thrown in -fno-exceptions mode");
+ _LIBCPP_VERBOSE_ABORT("filesystem_error was thrown in -fno-exceptions mode");
}
#endif
_LIBCPP_AVAILABILITY_FILESYSTEM_POP
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw bad_function_call();
#else
- std::__libcpp_verbose_abort("bad_function_call was thrown in -fno-exceptions mode");
+ _LIBCPP_VERBOSE_ABORT("bad_function_call was thrown in -fno-exceptions mode");
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw bad_weak_ptr();
#else
- std::__libcpp_verbose_abort("bad_weak_ptr was thrown in -fno-exceptions mode");
+ _LIBCPP_VERBOSE_ABORT("bad_weak_ptr was thrown in -fno-exceptions mode");
#endif
}
# endif
# if defined(_LIBCPP_HAS_NO_VERBOSE_ABORT_IN_LIBRARY)
-# define _LIBCPP_VERBOSE_ABORT(...) __builtin_abort()
+// The decltype is there to suppress -Wunused warnings in this configuration.
+# define _LIBCPP_VERBOSE_ABORT(...) (decltype(std::__libcpp_verbose_abort(__VA_ARGS__))(), __builtin_abort())
# else
# define _LIBCPP_VERBOSE_ABORT(...) ::std::__libcpp_verbose_abort(__VA_ARGS__)
# endif
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw bad_any_cast();
#else
- std::__libcpp_verbose_abort("bad_any_cast was thrown in -fno-exceptions mode");
+ _LIBCPP_VERBOSE_ABORT("bad_any_cast was thrown in -fno-exceptions mode");
#endif
}
throw future_error(make_error_code(__ev));
#else
(void)__ev;
- std::__libcpp_verbose_abort("future_error was thrown in -fno-exceptions mode");
+ _LIBCPP_VERBOSE_ABORT("future_error was thrown in -fno-exceptions mode");
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw ios_base::failure(__msg);
#else
- std::__libcpp_verbose_abort("ios_base::failure was thrown in -fno-exceptions mode with message \"%s\"", __msg);
+ _LIBCPP_VERBOSE_ABORT("ios_base::failure was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw bad_array_new_length();
#else
- std::__libcpp_verbose_abort("bad_array_new_length was thrown in -fno-exceptions mode");
+ _LIBCPP_VERBOSE_ABORT("bad_array_new_length was thrown in -fno-exceptions mode");
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw bad_optional_access();
#else
- std::__libcpp_verbose_abort("bad_optional_access was thrown in -fno-exceptions mode");
+ _LIBCPP_VERBOSE_ABORT("bad_optional_access was thrown in -fno-exceptions mode");
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw regex_error(_Ev);
#else
- std::__libcpp_verbose_abort("regex_error was thrown in -fno-exceptions mode");
+ _LIBCPP_VERBOSE_ABORT("regex_error was thrown in -fno-exceptions mode");
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw logic_error(__msg);
#else
- std::__libcpp_verbose_abort("logic_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
+ _LIBCPP_VERBOSE_ABORT("logic_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw domain_error(__msg);
#else
- std::__libcpp_verbose_abort("domain_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
+ _LIBCPP_VERBOSE_ABORT("domain_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw invalid_argument(__msg);
#else
- std::__libcpp_verbose_abort("invalid_argument was thrown in -fno-exceptions mode with message \"%s\"", __msg);
+ _LIBCPP_VERBOSE_ABORT("invalid_argument was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw length_error(__msg);
#else
- std::__libcpp_verbose_abort("length_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
+ _LIBCPP_VERBOSE_ABORT("length_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw out_of_range(__msg);
#else
- std::__libcpp_verbose_abort("out_of_range was thrown in -fno-exceptions mode with message \"%s\"", __msg);
+ _LIBCPP_VERBOSE_ABORT("out_of_range was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw range_error(__msg);
#else
- std::__libcpp_verbose_abort("range_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
+ _LIBCPP_VERBOSE_ABORT("range_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw overflow_error(__msg);
#else
- std::__libcpp_verbose_abort("overflow_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
+ _LIBCPP_VERBOSE_ABORT("overflow_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw underflow_error(__msg);
#else
- std::__libcpp_verbose_abort("underflow_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
+ _LIBCPP_VERBOSE_ABORT("underflow_error was thrown in -fno-exceptions mode with message \"%s\"", __msg);
#endif
}
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw bad_cast();
#else
- std::__libcpp_verbose_abort("bad_cast was thrown in -fno-exceptions mode");
+ _LIBCPP_VERBOSE_ABORT("bad_cast was thrown in -fno-exceptions mode");
#endif
}
_LIBCPP_END_NAMESPACE_STD
#ifndef _LIBCPP_HAS_NO_EXCEPTIONS
throw bad_variant_access();
#else
- std::__libcpp_verbose_abort("bad_variant_access was thrown in -fno-exceptions mode");
+ _LIBCPP_VERBOSE_ABORT("bad_variant_access was thrown in -fno-exceptions mode");
#endif
}