diff options
Diffstat (limited to 'system/include/libcxx')
-rw-r--r-- | system/include/libcxx/__locale | 10 | ||||
-rw-r--r-- | system/include/libcxx/exception | 14 | ||||
-rw-r--r-- | system/include/libcxx/ios | 8 | ||||
-rw-r--r-- | system/include/libcxx/locale | 14 | ||||
-rw-r--r-- | system/include/libcxx/mutex | 1 | ||||
-rw-r--r-- | system/include/libcxx/ostream | 9 | ||||
-rw-r--r-- | system/include/libcxx/streambuf | 9 | ||||
-rw-r--r-- | system/include/libcxx/string | 6 |
8 files changed, 30 insertions, 41 deletions
diff --git a/system/include/libcxx/__locale b/system/include/libcxx/__locale index b1c0dd7c..f63815c3 100644 --- a/system/include/libcxx/__locale +++ b/system/include/libcxx/__locale @@ -8,8 +8,6 @@ // //===----------------------------------------------------------------------===// -//class locale; // XXX Emscripten - #ifndef _LIBCPP___LOCALE #define _LIBCPP___LOCALE @@ -24,7 +22,7 @@ #if _WIN32 # include <support/win32/locale.h> #else // _WIN32 -/* XXX EMSCRIPTEN # include <xlocale.h> */ +# include <xlocale.h> #endif // _WIN32 #pragma GCC system_header @@ -44,7 +42,6 @@ public: class id; typedef int category; - /* XXX Emscripten static const category // values assigned here are for exposition only none = 0, collate = LC_COLLATE_MASK, @@ -54,7 +51,6 @@ public: time = LC_TIME_MASK, messages = LC_MESSAGES_MASK, all = collate | ctype | monetary | numeric | time | messages; - */ // construct/copy/destroy: locale() _NOEXCEPT; @@ -335,9 +331,9 @@ public: static const mask xdigit = _HEX; static const mask blank = _BLANK; #else // __GLIBC__ || _WIN32 -#if __APPLE__ +#if defined(__APPLE__) || defined(EMSCRIPTEN) typedef __uint32_t mask; -#elif defined(__FreeBSD__) or defined(EMSCRIPTEN) +#elif __FreeBSD__ typedef unsigned long mask; #endif static const mask space = _CTYPE_S; diff --git a/system/include/libcxx/exception b/system/include/libcxx/exception index f05855b4..f418575c 100644 --- a/system/include/libcxx/exception +++ b/system/include/libcxx/exception @@ -89,7 +89,7 @@ class _LIBCPP_EXCEPTION_ABI exception { public: _LIBCPP_INLINE_VISIBILITY exception() _NOEXCEPT {} - virtual ~exception() _NOEXCEPT{} + virtual ~exception() _NOEXCEPT; virtual const char* what() const _NOEXCEPT; }; @@ -105,19 +105,19 @@ public: typedef void (*unexpected_handler)(); _LIBCPP_VISIBLE unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT; _LIBCPP_VISIBLE unexpected_handler get_unexpected() _NOEXCEPT; -_LIBCPP_VISIBLE void unexpected(); /* XXX Emscripten: remove _ATTRIBUTE(noreturn), here and two places below */ +_ATTRIBUTE(noreturn) _LIBCPP_VISIBLE void unexpected(); typedef void (*terminate_handler)(); _LIBCPP_VISIBLE terminate_handler set_terminate(terminate_handler) _NOEXCEPT; _LIBCPP_VISIBLE terminate_handler get_terminate() _NOEXCEPT; -_LIBCPP_VISIBLE void terminate() _NOEXCEPT; +_ATTRIBUTE(noreturn) _LIBCPP_VISIBLE void terminate() _NOEXCEPT; _LIBCPP_VISIBLE bool uncaught_exception() _NOEXCEPT; class exception_ptr; exception_ptr current_exception() _NOEXCEPT; -void rethrow_exception(exception_ptr); +_ATTRIBUTE(noreturn) void rethrow_exception(exception_ptr); class _LIBCPP_VISIBLE exception_ptr { @@ -141,7 +141,7 @@ public: {return !(__x == __y);} friend exception_ptr current_exception() _NOEXCEPT; - friend void rethrow_exception(exception_ptr); + _ATTRIBUTE(noreturn) friend void rethrow_exception(exception_ptr); }; template<class _E> @@ -172,7 +172,7 @@ public: virtual ~nested_exception() _NOEXCEPT; // access functions - void rethrow_nested() const; + _ATTRIBUTE(noreturn) void rethrow_nested() const; _LIBCPP_INLINE_VISIBILITY exception_ptr nested_ptr() const _NOEXCEPT {return __ptr_;} }; @@ -185,6 +185,7 @@ struct __nested }; template <class _Tp> +_ATTRIBUTE(noreturn) void #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES throw_with_nested(_Tp&& __t, typename enable_if< @@ -203,6 +204,7 @@ throw_with_nested (_Tp& __t, typename enable_if< } template <class _Tp> +_ATTRIBUTE(noreturn) void #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES throw_with_nested(_Tp&& __t, typename enable_if< diff --git a/system/include/libcxx/ios b/system/include/libcxx/ios index 29bda558..e2f2b6fd 100644 --- a/system/include/libcxx/ios +++ b/system/include/libcxx/ios @@ -317,7 +317,7 @@ public: _LIBCPP_INLINE_VISIBILITY bool bad() const; _LIBCPP_INLINE_VISIBILITY iostate exceptions() const; - _LIBCPP_INLINE_VISIBILITY void exceptions(iostate except); /* XXX Emscripten: renammed __except to except because it is a reserved keyword */ + _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __except); void __set_badbit_and_consider_rethrow(); void __set_failbit_and_consider_rethrow(); @@ -553,9 +553,9 @@ ios_base::exceptions() const inline _LIBCPP_INLINE_VISIBILITY void -ios_base::exceptions(iostate except) /* XXX Emscripten: renammed __except to except because it is a reserved keyword */ +ios_base::exceptions(iostate __except) { - __exceptions_ = except; /* XXX Emscripten: renammed __except to except because it is a reserved keyword */ + __exceptions_ = __except; clear(__rdstate_); } @@ -584,7 +584,7 @@ public: _LIBCPP_ALWAYS_INLINE bool bad() const {return ios_base::bad();} _LIBCPP_ALWAYS_INLINE iostate exceptions() const {return ios_base::exceptions();} - _LIBCPP_ALWAYS_INLINE void exceptions(iostate except) {ios_base::exceptions(except);} /* XXX Emscripten: renammed __except to except because it is a reserved keyword */ + _LIBCPP_ALWAYS_INLINE void exceptions(iostate __except) {ios_base::exceptions(__except);} // 27.5.4.1 Constructor/destructor: _LIBCPP_INLINE_VISIBILITY diff --git a/system/include/libcxx/locale b/system/include/libcxx/locale index 153038ee..e9a18e32 100644 --- a/system/include/libcxx/locale +++ b/system/include/libcxx/locale @@ -189,7 +189,7 @@ template <class charT> class messages_byname; #if _WIN32 #include <support/win32/support.h> // vasprintf #else // _WIN32 -// XXX Emscripten #include <nl_types.h> +#include <nl_types.h> #endif // !_WIN32 #pragma GCC system_header @@ -800,7 +800,6 @@ template <class _CharT, class _InputIterator> locale::id num_get<_CharT, _InputIterator>::id; -/* XXX Emscripten template <class _Tp> _Tp __num_get_signed_integral(const char* __a, const char* __a_end, @@ -1308,8 +1307,6 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e, return __b; } -*/ - extern template class num_get<char>; extern template class num_get<wchar_t>; @@ -1392,7 +1389,7 @@ void __num_put<_CharT>::__widen_and_group_float(char* __nb, char* __np, char* __ne, _CharT* __ob, _CharT*& __op, _CharT*& __oe, const locale& __loc) -;/* XXX Emscripten { +{ const ctype<_CharT>& __ct = use_facet<ctype<_CharT> > (__loc); const numpunct<_CharT>& __npt = use_facet<numpunct<_CharT> >(__loc); string __grouping = __npt.grouping(); @@ -1467,7 +1464,6 @@ __num_put<_CharT>::__widen_and_group_float(char* __nb, char* __np, char* __ne, else __op = __ob + (__np - __nb); } -*/ extern template class __num_put<char>; extern template class __num_put<wchar_t>; @@ -3717,7 +3713,7 @@ template <class _CharT> typename messages<_CharT>::catalog messages<_CharT>::do_open(const basic_string<char>& __nm, const locale&) const { -#if defined(_WIN32) || defined(EMSCRIPTEN) +#if _WIN32 return -1; #else // _WIN32 catalog __cat = reinterpret_cast<catalog>(catopen(__nm.c_str(), NL_CAT_LOCALE)); @@ -3732,7 +3728,7 @@ typename messages<_CharT>::string_type messages<_CharT>::do_get(catalog __c, int __set, int __msgid, const string_type& __dflt) const { -#if defined(_WIN32) || defined(EMSCRIPTEN) +#if _WIN32 return __dflt; #else // _WIN32 string __ndflt; @@ -3754,7 +3750,7 @@ template <class _CharT> void messages<_CharT>::do_close(catalog __c) const { -#if !defined(_WIN32) && !defined(EMSCRIPTEN) +#if !_WIN32 if (__c != -1) __c <<= 1; nl_catd __cat = reinterpret_cast<nl_catd>(__c); diff --git a/system/include/libcxx/mutex b/system/include/libcxx/mutex index b79201a5..297baca5 100644 --- a/system/include/libcxx/mutex +++ b/system/include/libcxx/mutex @@ -178,7 +178,6 @@ template<class Callable, class ...Args> #ifndef _LIBCPP_HAS_NO_VARIADICS #include <tuple> #endif -#include "sched.h" /* XXX Emscripten */ #pragma GCC system_header diff --git a/system/include/libcxx/ostream b/system/include/libcxx/ostream index f7cbb8a2..f1a3de9c 100644 --- a/system/include/libcxx/ostream +++ b/system/include/libcxx/ostream @@ -204,7 +204,6 @@ protected: basic_ostream() {} // extension, intentially does not initialize }; -/* template <class _CharT, class _Traits> class _LIBCPP_VISIBLE basic_ostream<_CharT, _Traits>::sentry { @@ -1181,7 +1180,6 @@ basic_ostream<_CharT, _Traits>::seekp(off_type __off, ios_base::seekdir __dir) return *this; } -*/ template <class _CharT, class _Traits> inline _LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& @@ -1210,7 +1208,6 @@ flush(basic_ostream<_CharT, _Traits>& __os) return __os; } -/* #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES template <class _Stream, class _Tp> @@ -1287,9 +1284,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x) (use_facet<ctype<_CharT> >(__os.getloc()).widen('0'), use_facet<ctype<_CharT> >(__os.getloc()).widen('1')); } -*/ -//extern template class basic_ostream<char>; /* XXX EMScripten */ -//extern template class basic_ostream<wchar_t>; /* XXX EMScripten */ + +extern template class basic_ostream<char>; +extern template class basic_ostream<wchar_t>; _LIBCPP_END_NAMESPACE_STD diff --git a/system/include/libcxx/streambuf b/system/include/libcxx/streambuf index 20ae24f3..feb62c7e 100644 --- a/system/include/libcxx/streambuf +++ b/system/include/libcxx/streambuf @@ -111,7 +111,6 @@ protected: #include <__config> #include <iosfwd> #include <ios> -#include <__locale> #pragma GCC system_header @@ -552,11 +551,11 @@ basic_streambuf<_CharT, _Traits>::overflow(int_type __c) return traits_type::eof(); } -//extern template class basic_streambuf<char>; /* XXX EMScripten */ -//extern template class basic_streambuf<wchar_t>; /* XXX EMScripten */ +extern template class basic_streambuf<char>; +extern template class basic_streambuf<wchar_t>; -//extern template class basic_ios<char>; /* XXX EMScripten */ -//extern template class basic_ios<wchar_t>; /* XXX EMScripten */ +extern template class basic_ios<char>; +extern template class basic_ios<wchar_t>; _LIBCPP_END_NAMESPACE_STD diff --git a/system/include/libcxx/string b/system/include/libcxx/string index 4f3e0e76..2041510f 100644 --- a/system/include/libcxx/string +++ b/system/include/libcxx/string @@ -1021,7 +1021,7 @@ __basic_string_common<__b>::__throw_out_of_range() const #endif } -//extern template class __basic_string_common<true>; /* XXX EMScripten: Comment to export the class */ +extern template class __basic_string_common<true>; template<class _CharT, class _Traits, class _Allocator> class _LIBCPP_VISIBLE basic_string @@ -3965,8 +3965,8 @@ getline(basic_istream<_CharT, _Traits>&& __is, #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES -//extern template class basic_string<char>; /* XXX EMScripten: Comment to export the class */ -//extern template class basic_string<wchar_t>; /* XXX EMScripten: Comment to export the class */ +extern template class basic_string<char>; +extern template class basic_string<wchar_t>; extern template string |