blob: 6560d0188ee32b59acf9d85bce68a90787de43a9 [file] [log] [blame]
Louis Dionne3956a342023-06-14 22:36:371//===----------------------------------------------------------------------===//
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//===----------------------------------------------------------------------===//
8
Louis Dionne25839462023-08-08 22:10:109#include <__verbose_abort>
Louis Dionne3956a342023-06-14 22:36:3710#include <new>
11
12namespace std { // purposefully not versioned
13
14#ifndef __GLIBCXX__
15const nothrow_t nothrow{};
16#endif
17
18#ifndef LIBSTDCXX
19
20void __throw_bad_alloc() {
21# ifndef _LIBCPP_HAS_NO_EXCEPTIONS
22 throw bad_alloc();
23# else
Louis Dionne25839462023-08-08 22:10:1024 _LIBCPP_VERBOSE_ABORT("bad_alloc was thrown in -fno-exceptions mode");
Louis Dionne3956a342023-06-14 22:36:3725# endif
26}
27
28#endif // !LIBSTDCXX
29
30} // namespace std