Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / src / stdexcept.cpp
blobbc25c0f9e6ef6258add4a5f8d9bd00f8b07e91e6
1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
9 #include <__verbose_abort>
10 #include <new>
11 #include <stdexcept>
12 #include <string>
14 #ifdef _LIBCPP_ABI_VCRUNTIME
15 # include "support/runtime/stdexcept_vcruntime.ipp"
16 #else
17 # include "support/runtime/stdexcept_default.ipp"
18 #endif
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);
25 #else
26 _LIBCPP_VERBOSE_ABORT("runtime_error was thrown in -fno-exceptions mode with message \"%s\"", msg);
27 #endif
30 _LIBCPP_END_NAMESPACE_STD