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