Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / src / new_helpers.cpp
blob6560d0188ee32b59acf9d85bce68a90787de43a9
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>
12 namespace std { // purposefully not versioned
14 #ifndef __GLIBCXX__
15 const nothrow_t nothrow{};
16 #endif
18 #ifndef LIBSTDCXX
20 void __throw_bad_alloc() {
21 # ifndef _LIBCPP_HAS_NO_EXCEPTIONS
22 throw bad_alloc();
23 # else
24 _LIBCPP_VERBOSE_ABORT("bad_alloc was thrown in -fno-exceptions mode");
25 # endif
28 #endif // !LIBSTDCXX
30 } // namespace std