1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include <__verbose_abort>
14 #ifdef _LIBCPP_ABI_VCRUNTIME
15 # include "support/runtime/stdexcept_vcruntime.ipp"
17 # include "support/runtime/stdexcept_default.ipp"
20 _LIBCPP_BEGIN_NAMESPACE_STD
22 _LIBCPP_NORETURN
void __throw_runtime_error(const char* msg
) {
23 #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
24 throw runtime_error(msg
);
26 _LIBCPP_VERBOSE_ABORT("runtime_error was thrown in -fno-exceptions mode with message \"%s\"", msg
);
30 _LIBCPP_END_NAMESPACE_STD