brintos

brintos / llvm-project-archived public Read only

0
0
Text · 745 B · 2119d82 Raw
31 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9#include <__verbose_abort>10#include <new>11 12namespace std { // purposefully not versioned13 14#ifndef __GLIBCXX__15const nothrow_t nothrow{};16#endif17 18#ifndef LIBSTDCXX19 20void __throw_bad_alloc() {21#  if _LIBCPP_HAS_EXCEPTIONS22  throw bad_alloc();23#  else24  _LIBCPP_VERBOSE_ABORT("bad_alloc was thrown in -fno-exceptions mode");25#  endif26}27 28#endif // !LIBSTDCXX29 30} // namespace std31