1e9c9f002SEric Fiselier //===------------------------ stdexcept.cpp -------------------------------===// 2e9c9f002SEric Fiselier // 3*57b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*57b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 5*57b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6e9c9f002SEric Fiselier // 7e9c9f002SEric Fiselier //===----------------------------------------------------------------------===// 8e9c9f002SEric Fiselier 984800d99SEric Fiselier #include "include/refstring.h" 10e9c9f002SEric Fiselier #include "stdexcept" 11e9c9f002SEric Fiselier #include "new" 12e9c9f002SEric Fiselier #include <cstdlib> 13e9c9f002SEric Fiselier #include <cstring> 14e9c9f002SEric Fiselier #include <cstdint> 15e9c9f002SEric Fiselier #include <cstddef> 16e9c9f002SEric Fiselier 17e9c9f002SEric Fiselier static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), ""); 18e9c9f002SEric Fiselier 19e9c9f002SEric Fiselier namespace std // purposefully not using versioning namespace 20e9c9f002SEric Fiselier { 21e9c9f002SEric Fiselier 22e9c9f002SEric Fiselier logic_error::~logic_error() _NOEXCEPT {} 23e9c9f002SEric Fiselier 24e9c9f002SEric Fiselier const char* 25e9c9f002SEric Fiselier logic_error::what() const _NOEXCEPT 26e9c9f002SEric Fiselier { 27e9c9f002SEric Fiselier return __imp_.c_str(); 28e9c9f002SEric Fiselier } 29e9c9f002SEric Fiselier 30e9c9f002SEric Fiselier runtime_error::~runtime_error() _NOEXCEPT {} 31e9c9f002SEric Fiselier 32e9c9f002SEric Fiselier const char* 33e9c9f002SEric Fiselier runtime_error::what() const _NOEXCEPT 34e9c9f002SEric Fiselier { 35e9c9f002SEric Fiselier return __imp_.c_str(); 36e9c9f002SEric Fiselier } 37e9c9f002SEric Fiselier 38e9c9f002SEric Fiselier domain_error::~domain_error() _NOEXCEPT {} 39e9c9f002SEric Fiselier invalid_argument::~invalid_argument() _NOEXCEPT {} 40e9c9f002SEric Fiselier length_error::~length_error() _NOEXCEPT {} 41e9c9f002SEric Fiselier out_of_range::~out_of_range() _NOEXCEPT {} 42e9c9f002SEric Fiselier 43e9c9f002SEric Fiselier range_error::~range_error() _NOEXCEPT {} 44e9c9f002SEric Fiselier overflow_error::~overflow_error() _NOEXCEPT {} 45e9c9f002SEric Fiselier underflow_error::~underflow_error() _NOEXCEPT {} 46e9c9f002SEric Fiselier 47e9c9f002SEric Fiselier } // std 48