Index: libcxx/include/__locale =================================================================== --- libcxx/include/__locale +++ libcxx/include/__locale @@ -1184,7 +1184,11 @@ _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS codecvt_byname) _LIBCPP_EXTERN_TEMPLATE2(class _LIBCPP_TYPE_VIS codecvt_byname) +#ifndef _LIBCPP_NO_EXCEPTIONS +_LIBCPP_FUNC_VIS void __throw_runtime_error(const char*) __attribute__((__noreturn__)); +#else _LIBCPP_FUNC_VIS void __throw_runtime_error(const char*); +#endif template struct __narrow_to_utf8 Index: libcxx/include/deque =================================================================== --- libcxx/include/deque +++ libcxx/include/deque @@ -895,8 +895,14 @@ class __deque_base_common { protected: +#ifndef _LIBCPP_NO_EXCEPTIONS + void __throw_length_error() const __attribute__((__noreturn__)); + void __throw_out_of_range() const __attribute__((__noreturn__)); +#else + void __throw_length_error() const; void __throw_out_of_range() const; +#endif }; template Index: libcxx/include/future =================================================================== --- libcxx/include/future +++ libcxx/include/future @@ -512,15 +512,19 @@ virtual ~future_error() _NOEXCEPT; }; +#ifndef _LIBCPP_NO_EXCEPTIONS inline _LIBCPP_ALWAYS_INLINE -void __throw_future_error(future_errc _Ev) +void __throw_future_error(future_errc _Ev) __attribute__((__noreturn__)) { -#ifndef _LIBCPP_NO_EXCEPTIONS throw future_error(make_error_code(_Ev)); +} #else +inline _LIBCPP_ALWAYS_INLINE +void __throw_future_error(future_errc _Ev) +{ assert(!"future_error"); -#endif } +#endif class _LIBCPP_TYPE_VIS __assoc_sub_state : public __shared_count Index: libcxx/include/regex =================================================================== --- libcxx/include/regex +++ libcxx/include/regex @@ -956,16 +956,21 @@ regex_constants::error_type code() const {return __code_;} }; +#ifndef _LIBCPP_NO_EXCEPTIONS template _LIBCPP_ALWAYS_INLINE -void __throw_regex_error() +void __throw_regex_error() __attribute__((__noreturn__)) { -#ifndef _LIBCPP_NO_EXCEPTIONS throw regex_error(_Ev); +} #else +template +_LIBCPP_ALWAYS_INLINE +void __throw_regex_error() +{ assert(!"regex_error"); -#endif } +#endif template struct _LIBCPP_TYPE_VIS_ONLY regex_traits Index: libcxx/include/system_error =================================================================== --- libcxx/include/system_error +++ libcxx/include/system_error @@ -635,7 +635,13 @@ static string __init(const error_code&, string); }; +#ifndef _LIBCPP_NO_EXCEPTIONS +_LIBCPP_FUNC_VIS +void __throw_system_error(int ev, + const char* what_arg) __attribute__((__noreturn__)); +#else _LIBCPP_FUNC_VIS void __throw_system_error(int ev, const char* what_arg); +#endif _LIBCPP_END_NAMESPACE_STD Index: libcxx/include/vector =================================================================== --- libcxx/include/vector +++ libcxx/include/vector @@ -290,8 +290,14 @@ { protected: _LIBCPP_ALWAYS_INLINE __vector_base_common() {} +#ifndef _LIBCPP_NO_EXCEPTIONS + void __throw_length_error() const __attribute__((__noreturn__)); + void __throw_out_of_range() const __attribute__((__noreturn__)); +#else void __throw_length_error() const; void __throw_out_of_range() const; +#endif + }; template