diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2013-11-19 18:05:03 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2013-11-19 18:05:03 +0000 |
| commit | 7e1ea8d288c2451425675f6292ace3a6ba8d480c (patch) | |
| tree | 0898b786d5c2fe3bcf38bd3d15197aa85d5fefc1 /libcxx/src | |
| parent | f720f86774ba0edcecdf738734beb858df19fa55 (diff) | |
| download | bcm5719-llvm-7e1ea8d288c2451425675f6292ace3a6ba8d480c.tar.gz bcm5719-llvm-7e1ea8d288c2451425675f6292ace3a6ba8d480c.zip | |
Patch by Bruce Mitchener. Change all references to EMSCRIPTEN to __EMSCRIPTEN__. If you're not using the PP symbol EMSCRIPTEN, then you should see no functionality change.
llvm-svn: 195136
Diffstat (limited to 'libcxx/src')
| -rw-r--r-- | libcxx/src/exception.cpp | 6 | ||||
| -rw-r--r-- | libcxx/src/locale.cpp | 24 |
2 files changed, 15 insertions, 15 deletions
diff --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp index 572d9779138..3ce6f2e1118 100644 --- a/libcxx/src/exception.cpp +++ b/libcxx/src/exception.cpp @@ -79,7 +79,7 @@ get_terminate() _NOEXCEPT return __sync_fetch_and_add(&__terminate_handler, (terminate_handler)0); } -#ifndef EMSCRIPTEN // We provide this in JS +#ifndef __EMSCRIPTEN__ // We provide this in JS _LIBCPP_NORETURN void terminate() _NOEXCEPT @@ -102,10 +102,10 @@ terminate() _NOEXCEPT } #endif // _LIBCPP_NO_EXCEPTIONS } -#endif // !EMSCRIPTEN +#endif // !__EMSCRIPTEN__ #endif // !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION) -#if !defined(LIBCXXRT) && !defined(__GLIBCXX__) && !defined(EMSCRIPTEN) +#if !defined(LIBCXXRT) && !defined(__GLIBCXX__) && !defined(__EMSCRIPTEN__) bool uncaught_exception() _NOEXCEPT { #if defined(__APPLE__) || defined(_LIBCPPABI_VERSION) diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp index 8fadbb6fdfd..a326323ac1e 100644 --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -812,7 +812,7 @@ ctype<wchar_t>::do_toupper(char_type c) const { #ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE return isascii(c) ? _DefaultRuneLocale.__mapupper[c] : c; -#elif defined(__GLIBC__) || defined(EMSCRIPTEN) || defined(__NetBSD__) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) return isascii(c) ? ctype<char>::__classic_upper_table()[c] : c; #else return (isascii(c) && iswlower_l(c, __cloc())) ? c-L'a'+L'A' : c; @@ -825,7 +825,7 @@ ctype<wchar_t>::do_toupper(char_type* low, const char_type* high) const for (; low != high; ++low) #ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE *low = isascii(*low) ? _DefaultRuneLocale.__mapupper[*low] : *low; -#elif defined(__GLIBC__) || defined(EMSCRIPTEN) || defined(__NetBSD__) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) *low = isascii(*low) ? ctype<char>::__classic_upper_table()[*low] : *low; #else @@ -839,7 +839,7 @@ ctype<wchar_t>::do_tolower(char_type c) const { #ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE return isascii(c) ? _DefaultRuneLocale.__maplower[c] : c; -#elif defined(__GLIBC__) || defined(EMSCRIPTEN) || defined(__NetBSD__) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) return isascii(c) ? ctype<char>::__classic_lower_table()[c] : c; #else return (isascii(c) && isupper_l(c, __cloc())) ? c-L'A'+'a' : c; @@ -852,7 +852,7 @@ ctype<wchar_t>::do_tolower(char_type* low, const char_type* high) const for (; low != high; ++low) #ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE *low = isascii(*low) ? _DefaultRuneLocale.__maplower[*low] : *low; -#elif defined(__GLIBC__) || defined(EMSCRIPTEN) || defined(__NetBSD__) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) *low = isascii(*low) ? ctype<char>::__classic_lower_table()[*low] : *low; #else @@ -921,7 +921,7 @@ ctype<char>::do_toupper(char_type c) const static_cast<char>(_DefaultRuneLocale.__mapupper[static_cast<ptrdiff_t>(c)]) : c; #elif defined(__NetBSD__) return static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(c)]); -#elif defined(__GLIBC__) || defined(EMSCRIPTEN) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) return isascii(c) ? static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(c)]) : c; #else @@ -938,7 +938,7 @@ ctype<char>::do_toupper(char_type* low, const char_type* high) const static_cast<char>(_DefaultRuneLocale.__mapupper[static_cast<ptrdiff_t>(*low)]) : *low; #elif defined(__NetBSD__) *low = static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(*low)]); -#elif defined(__GLIBC__) || defined(EMSCRIPTEN) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) *low = isascii(*low) ? static_cast<char>(__classic_upper_table()[static_cast<size_t>(*low)]) : *low; #else @@ -955,7 +955,7 @@ ctype<char>::do_tolower(char_type c) const static_cast<char>(_DefaultRuneLocale.__maplower[static_cast<ptrdiff_t>(c)]) : c; #elif defined(__NetBSD__) return static_cast<char>(__classic_lower_table()[static_cast<unsigned char>(c)]); -#elif defined(__GLIBC__) || defined(EMSCRIPTEN) || defined(__NetBSD__) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) return isascii(c) ? static_cast<char>(__classic_lower_table()[static_cast<size_t>(c)]) : c; #else @@ -971,7 +971,7 @@ ctype<char>::do_tolower(char_type* low, const char_type* high) const *low = isascii(*low) ? static_cast<char>(_DefaultRuneLocale.__maplower[static_cast<ptrdiff_t>(*low)]) : *low; #elif defined(__NetBSD__) *low = static_cast<char>(__classic_lower_table()[static_cast<unsigned char>(*low)]); -#elif defined(__GLIBC__) || defined(EMSCRIPTEN) +#elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) *low = isascii(*low) ? static_cast<char>(__classic_lower_table()[static_cast<size_t>(*low)]) : *low; #else *low = (isascii(*low) && isupper_l(*low, __cloc())) ? *low-'A'+'a' : *low; @@ -1012,7 +1012,7 @@ ctype<char>::do_narrow(const char_type* low, const char_type* high, char dfault, return low; } -#ifdef EMSCRIPTEN +#ifdef __EMSCRIPTEN__ extern "C" const unsigned short ** __ctype_b_loc(); extern "C" const int ** __ctype_tolower_loc(); extern "C" const int ** __ctype_toupper_loc(); @@ -1033,7 +1033,7 @@ ctype<char>::classic_table() _NOEXCEPT return _ctype+1; // internal ctype mask table defined in msvcrt.dll // This is assumed to be safe, which is a nonsense assumption because we're // going to end up dereferencing it later... -#elif defined(EMSCRIPTEN) +#elif defined(__EMSCRIPTEN__) return *__ctype_b_loc(); #elif defined(_AIX) return (const unsigned long *)__lc_ctype_ptr->obj->mask; @@ -1072,7 +1072,7 @@ ctype<char>::__classic_upper_table() _NOEXCEPT return _C_toupper_tab_ + 1; } -#elif defined(EMSCRIPTEN) +#elif defined(__EMSCRIPTEN__) const int* ctype<char>::__classic_lower_table() _NOEXCEPT { @@ -1084,7 +1084,7 @@ ctype<char>::__classic_upper_table() _NOEXCEPT { return *__ctype_toupper_loc(); } -#endif // __GLIBC__ || EMSCRIPTEN || __NETBSD__ +#endif // __GLIBC__ || __EMSCRIPTEN__ || __NETBSD__ // template <> class ctype_byname<char> |

