1 //===---------------------------- exception.cpp ---------------------------===// 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 9 #include <new> 10 #include <exception> 11 12 namespace std 13 { 14 15 // exception 16 ~exception()17exception::~exception() _NOEXCEPT 18 { 19 } 20 what() const21const char* exception::what() const _NOEXCEPT 22 { 23 return "std::exception"; 24 } 25 26 // bad_exception 27 ~bad_exception()28bad_exception::~bad_exception() _NOEXCEPT 29 { 30 } 31 what() const32const char* bad_exception::what() const _NOEXCEPT 33 { 34 return "std::bad_exception"; 35 } 36 37 38 // bad_alloc 39 bad_alloc()40bad_alloc::bad_alloc() _NOEXCEPT 41 { 42 } 43 ~bad_alloc()44bad_alloc::~bad_alloc() _NOEXCEPT 45 { 46 } 47 48 const char* what() const49bad_alloc::what() const _NOEXCEPT 50 { 51 return "std::bad_alloc"; 52 } 53 54 // bad_array_new_length 55 bad_array_new_length()56bad_array_new_length::bad_array_new_length() _NOEXCEPT 57 { 58 } 59 ~bad_array_new_length()60bad_array_new_length::~bad_array_new_length() _NOEXCEPT 61 { 62 } 63 64 const char* what() const65bad_array_new_length::what() const _NOEXCEPT 66 { 67 return "bad_array_new_length"; 68 } 69 70 } // std 71