diff options
Diffstat (limited to 'contrib/llvm-project/libcxx/include/stdexcept')
| -rw-r--r-- | contrib/llvm-project/libcxx/include/stdexcept | 66 |
1 files changed, 37 insertions, 29 deletions
diff --git a/contrib/llvm-project/libcxx/include/stdexcept b/contrib/llvm-project/libcxx/include/stdexcept index 5428535a1022..d41e94a5f9e8 100644 --- a/contrib/llvm-project/libcxx/include/stdexcept +++ b/contrib/llvm-project/libcxx/include/stdexcept @@ -44,8 +44,8 @@ public: #include <__assert> // all public C++ headers provide the assertion handler #include <__config> #include <__exception/exception.h> +#include <__fwd/string.h> #include <__verbose_abort> -#include <iosfwd> // for string forward decl #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header @@ -79,7 +79,7 @@ class _LIBCPP_EXPORTED_FROM_ABI logic_error { #ifndef _LIBCPP_ABI_VCRUNTIME private: - _VSTD::__libcpp_refstring __imp_; + std::__libcpp_refstring __imp_; public: explicit logic_error(const string&); explicit logic_error(const char*); @@ -92,8 +92,8 @@ public: const char* what() const _NOEXCEPT override; #else public: - explicit logic_error(const _VSTD::string&); // Symbol uses versioned std::string - _LIBCPP_INLINE_VISIBILITY explicit logic_error(const char* __s) : exception(__s) {} + explicit logic_error(const std::string&); // Symbol uses versioned std::string + _LIBCPP_HIDE_FROM_ABI explicit logic_error(const char* __s) : exception(__s) {} #endif }; @@ -102,7 +102,7 @@ class _LIBCPP_EXPORTED_FROM_ABI runtime_error { #ifndef _LIBCPP_ABI_VCRUNTIME private: - _VSTD::__libcpp_refstring __imp_; + std::__libcpp_refstring __imp_; public: explicit runtime_error(const string&); explicit runtime_error(const char*); @@ -115,8 +115,8 @@ public: const char* what() const _NOEXCEPT override; #else public: - explicit runtime_error(const _VSTD::string&); // Symbol uses versioned std::string - _LIBCPP_INLINE_VISIBILITY explicit runtime_error(const char* __s) : exception(__s) {} + explicit runtime_error(const std::string&); // Symbol uses versioned std::string + _LIBCPP_HIDE_FROM_ABI explicit runtime_error(const char* __s) : exception(__s) {} #endif // _LIBCPP_ABI_VCRUNTIME }; @@ -124,11 +124,12 @@ class _LIBCPP_EXPORTED_FROM_ABI domain_error : public logic_error { public: - _LIBCPP_INLINE_VISIBILITY explicit domain_error(const string& __s) : logic_error(__s) {} - _LIBCPP_INLINE_VISIBILITY explicit domain_error(const char* __s) : logic_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit domain_error(const string& __s) : logic_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit domain_error(const char* __s) : logic_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI domain_error(const domain_error&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI domain_error& operator=(const domain_error&) _NOEXCEPT = default; ~domain_error() _NOEXCEPT override; #endif }; @@ -137,11 +138,12 @@ class _LIBCPP_EXPORTED_FROM_ABI invalid_argument : public logic_error { public: - _LIBCPP_INLINE_VISIBILITY explicit invalid_argument(const string& __s) : logic_error(__s) {} - _LIBCPP_INLINE_VISIBILITY explicit invalid_argument(const char* __s) : logic_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit invalid_argument(const string& __s) : logic_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit invalid_argument(const char* __s) : logic_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI invalid_argument(const invalid_argument&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI invalid_argument& operator=(const invalid_argument&) _NOEXCEPT = default; ~invalid_argument() _NOEXCEPT override; #endif }; @@ -150,10 +152,11 @@ class _LIBCPP_EXPORTED_FROM_ABI length_error : public logic_error { public: - _LIBCPP_INLINE_VISIBILITY explicit length_error(const string& __s) : logic_error(__s) {} - _LIBCPP_INLINE_VISIBILITY explicit length_error(const char* __s) : logic_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit length_error(const string& __s) : logic_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit length_error(const char* __s) : logic_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI length_error(const length_error&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI length_error& operator=(const length_error&) _NOEXCEPT = default; ~length_error() _NOEXCEPT override; #endif }; @@ -162,11 +165,12 @@ class _LIBCPP_EXPORTED_FROM_ABI out_of_range : public logic_error { public: - _LIBCPP_INLINE_VISIBILITY explicit out_of_range(const string& __s) : logic_error(__s) {} - _LIBCPP_INLINE_VISIBILITY explicit out_of_range(const char* __s) : logic_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit out_of_range(const string& __s) : logic_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit out_of_range(const char* __s) : logic_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI out_of_range(const out_of_range&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI out_of_range& operator=(const out_of_range&) _NOEXCEPT = default; ~out_of_range() _NOEXCEPT override; #endif }; @@ -175,11 +179,12 @@ class _LIBCPP_EXPORTED_FROM_ABI range_error : public runtime_error { public: - _LIBCPP_INLINE_VISIBILITY explicit range_error(const string& __s) : runtime_error(__s) {} - _LIBCPP_INLINE_VISIBILITY explicit range_error(const char* __s) : runtime_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit range_error(const string& __s) : runtime_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit range_error(const char* __s) : runtime_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI range_error(const range_error&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI range_error& operator=(const range_error&) _NOEXCEPT = default; ~range_error() _NOEXCEPT override; #endif }; @@ -188,11 +193,12 @@ class _LIBCPP_EXPORTED_FROM_ABI overflow_error : public runtime_error { public: - _LIBCPP_INLINE_VISIBILITY explicit overflow_error(const string& __s) : runtime_error(__s) {} - _LIBCPP_INLINE_VISIBILITY explicit overflow_error(const char* __s) : runtime_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit overflow_error(const string& __s) : runtime_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit overflow_error(const char* __s) : runtime_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI overflow_error(const overflow_error&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI overflow_error& operator=(const overflow_error&) _NOEXCEPT = default; ~overflow_error() _NOEXCEPT override; #endif }; @@ -201,11 +207,12 @@ class _LIBCPP_EXPORTED_FROM_ABI underflow_error : public runtime_error { public: - _LIBCPP_INLINE_VISIBILITY explicit underflow_error(const string& __s) : runtime_error(__s) {} - _LIBCPP_INLINE_VISIBILITY explicit underflow_error(const char* __s) : runtime_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit underflow_error(const string& __s) : runtime_error(__s) {} + _LIBCPP_HIDE_FROM_ABI explicit underflow_error(const char* __s) : runtime_error(__s) {} #ifndef _LIBCPP_ABI_VCRUNTIME _LIBCPP_HIDE_FROM_ABI underflow_error(const underflow_error&) _NOEXCEPT = default; + _LIBCPP_HIDE_FROM_ABI underflow_error& operator=(const underflow_error&) _NOEXCEPT = default; ~underflow_error() _NOEXCEPT override; #endif }; @@ -217,7 +224,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD // in the dylib _LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_runtime_error(const char*); -_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_logic_error(const char*__msg) { #ifndef _LIBCPP_HAS_NO_EXCEPTIONS @@ -227,7 +234,7 @@ void __throw_logic_error(const char*__msg) #endif } -_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_domain_error(const char*__msg) { #ifndef _LIBCPP_HAS_NO_EXCEPTIONS @@ -237,7 +244,7 @@ void __throw_domain_error(const char*__msg) #endif } -_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_invalid_argument(const char*__msg) { #ifndef _LIBCPP_HAS_NO_EXCEPTIONS @@ -247,7 +254,7 @@ void __throw_invalid_argument(const char*__msg) #endif } -_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_length_error(const char*__msg) { #ifndef _LIBCPP_HAS_NO_EXCEPTIONS @@ -257,7 +264,7 @@ void __throw_length_error(const char*__msg) #endif } -_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_out_of_range(const char*__msg) { #ifndef _LIBCPP_HAS_NO_EXCEPTIONS @@ -267,7 +274,7 @@ void __throw_out_of_range(const char*__msg) #endif } -_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_range_error(const char*__msg) { #ifndef _LIBCPP_HAS_NO_EXCEPTIONS @@ -277,7 +284,7 @@ void __throw_range_error(const char*__msg) #endif } -_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_overflow_error(const char*__msg) { #ifndef _LIBCPP_HAS_NO_EXCEPTIONS @@ -287,7 +294,7 @@ void __throw_overflow_error(const char*__msg) #endif } -_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY +_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void __throw_underflow_error(const char*__msg) { #ifndef _LIBCPP_HAS_NO_EXCEPTIONS @@ -302,6 +309,7 @@ _LIBCPP_END_NAMESPACE_STD #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include <cstdlib> # include <exception> +# include <iosfwd> #endif #endif // _LIBCPP_STDEXCEPT |
