Louis Dionne | 6edba26 | 2021-11-17 16:25:01 -0500 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
Howard Hinnant | 62f8b1f | 2012-01-24 21:48:10 +0000 | [diff] [blame] | 2 | // |
Chandler Carruth | 87bc9b4 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 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 |
Howard Hinnant | 62f8b1f | 2012-01-24 21:48:10 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
Eric Fiselier | b882892 | 2017-03-01 23:59:34 +0000 | [diff] [blame] | 9 | #include <new> |
Howard Hinnant | 62f8b1f | 2012-01-24 21:48:10 +0000 | [diff] [blame] | 10 | #include <exception> |
| 11 | |
Howard Hinnant | 62f8b1f | 2012-01-24 21:48:10 +0000 | [diff] [blame] | 12 | namespace std |
| 13 | { |
| 14 | |
| 15 | // exception |
| 16 | |
Louis Dionne | 1d2faed | 2021-03-01 12:09:45 -0500 | [diff] [blame] | 17 | exception::~exception() noexcept |
Howard Hinnant | 62f8b1f | 2012-01-24 21:48:10 +0000 | [diff] [blame] | 18 | { |
| 19 | } |
| 20 | |
Louis Dionne | 1d2faed | 2021-03-01 12:09:45 -0500 | [diff] [blame] | 21 | const char* exception::what() const noexcept |
Howard Hinnant | 62f8b1f | 2012-01-24 21:48:10 +0000 | [diff] [blame] | 22 | { |
| 23 | return "std::exception"; |
| 24 | } |
| 25 | |
| 26 | // bad_exception |
| 27 | |
Louis Dionne | 1d2faed | 2021-03-01 12:09:45 -0500 | [diff] [blame] | 28 | bad_exception::~bad_exception() noexcept |
Howard Hinnant | 62f8b1f | 2012-01-24 21:48:10 +0000 | [diff] [blame] | 29 | { |
| 30 | } |
| 31 | |
Louis Dionne | 1d2faed | 2021-03-01 12:09:45 -0500 | [diff] [blame] | 32 | const char* bad_exception::what() const noexcept |
Howard Hinnant | 62f8b1f | 2012-01-24 21:48:10 +0000 | [diff] [blame] | 33 | { |
| 34 | return "std::bad_exception"; |
| 35 | } |
| 36 | |
Eric Fiselier | b882892 | 2017-03-01 23:59:34 +0000 | [diff] [blame] | 37 | |
| 38 | // bad_alloc |
| 39 | |
Louis Dionne | 1d2faed | 2021-03-01 12:09:45 -0500 | [diff] [blame] | 40 | bad_alloc::bad_alloc() noexcept |
Eric Fiselier | b882892 | 2017-03-01 23:59:34 +0000 | [diff] [blame] | 41 | { |
| 42 | } |
| 43 | |
Louis Dionne | 1d2faed | 2021-03-01 12:09:45 -0500 | [diff] [blame] | 44 | bad_alloc::~bad_alloc() noexcept |
Eric Fiselier | b882892 | 2017-03-01 23:59:34 +0000 | [diff] [blame] | 45 | { |
| 46 | } |
| 47 | |
| 48 | const char* |
Louis Dionne | 1d2faed | 2021-03-01 12:09:45 -0500 | [diff] [blame] | 49 | bad_alloc::what() const noexcept |
Eric Fiselier | b882892 | 2017-03-01 23:59:34 +0000 | [diff] [blame] | 50 | { |
| 51 | return "std::bad_alloc"; |
| 52 | } |
| 53 | |
| 54 | // bad_array_new_length |
| 55 | |
Louis Dionne | 1d2faed | 2021-03-01 12:09:45 -0500 | [diff] [blame] | 56 | bad_array_new_length::bad_array_new_length() noexcept |
Eric Fiselier | b882892 | 2017-03-01 23:59:34 +0000 | [diff] [blame] | 57 | { |
| 58 | } |
| 59 | |
Louis Dionne | 1d2faed | 2021-03-01 12:09:45 -0500 | [diff] [blame] | 60 | bad_array_new_length::~bad_array_new_length() noexcept |
Eric Fiselier | b882892 | 2017-03-01 23:59:34 +0000 | [diff] [blame] | 61 | { |
| 62 | } |
| 63 | |
| 64 | const char* |
Louis Dionne | 1d2faed | 2021-03-01 12:09:45 -0500 | [diff] [blame] | 65 | bad_array_new_length::what() const noexcept |
Eric Fiselier | b882892 | 2017-03-01 23:59:34 +0000 | [diff] [blame] | 66 | { |
| 67 | return "bad_array_new_length"; |
| 68 | } |
| 69 | |
Howard Hinnant | 62f8b1f | 2012-01-24 21:48:10 +0000 | [diff] [blame] | 70 | } // std |