blob: e3b7cd406583761bf6a891a4400e3210fd4fbd75 [file] [log] [blame]
Howard Hinnanta2bde872012-02-17 19:23:47 +00001//===------------------------ stdexcept.cpp -------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Eric Fiselier28942d32017-07-12 01:34:21 +000010#include "include/refstring.h"
Howard Hinnanta2bde872012-02-17 19:23:47 +000011#include "stdexcept"
12#include "new"
13#include <cstdlib>
14#include <cstring>
15#include <cstdint>
16#include <cstddef>
17
Marshall Clowf7a83f72014-05-07 20:17:41 +000018static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), "");
Howard Hinnanta2bde872012-02-17 19:23:47 +000019
20namespace std // purposefully not using versioning namespace
21{
22
Marshall Clowf7a83f72014-05-07 20:17:41 +000023logic_error::~logic_error() _NOEXCEPT {}
Howard Hinnanta2bde872012-02-17 19:23:47 +000024
25const char*
26logic_error::what() const _NOEXCEPT
27{
Marshall Clowf7a83f72014-05-07 20:17:41 +000028 return __imp_.c_str();
Howard Hinnanta2bde872012-02-17 19:23:47 +000029}
30
Marshall Clowf7a83f72014-05-07 20:17:41 +000031runtime_error::~runtime_error() _NOEXCEPT {}
Howard Hinnanta2bde872012-02-17 19:23:47 +000032
33const char*
34runtime_error::what() const _NOEXCEPT
35{
Marshall Clowf7a83f72014-05-07 20:17:41 +000036 return __imp_.c_str();
Howard Hinnanta2bde872012-02-17 19:23:47 +000037}
38
39domain_error::~domain_error() _NOEXCEPT {}
40invalid_argument::~invalid_argument() _NOEXCEPT {}
41length_error::~length_error() _NOEXCEPT {}
42out_of_range::~out_of_range() _NOEXCEPT {}
43
44range_error::~range_error() _NOEXCEPT {}
45overflow_error::~overflow_error() _NOEXCEPT {}
46underflow_error::~underflow_error() _NOEXCEPT {}
47
48} // std