[libcxx] r231897 - Move Android to the builtin rune table.

Dan Albert danalbert at google.com
Tue Mar 10 17:51:06 PDT 2015


Author: danalbert
Date: Tue Mar 10 19:51:06 2015
New Revision: 231897

URL: http://llvm.org/viewvc/llvm-project?rev=231897&view=rev
Log:
Move Android to the builtin rune table.

Modified:
    libcxx/trunk/include/__config
    libcxx/trunk/include/__locale
    libcxx/trunk/src/locale.cpp

Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=231897&r1=231896&r2=231897&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Tue Mar 10 19:51:06 2015
@@ -719,4 +719,8 @@ extern "C" void __sanitizer_annotate_con
          _LIBCPP_HAS_NO_THREADS is defined.
 #endif
 
+#if defined(__ANDROID__)
+#define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
+#endif
+
 #endif  // _LIBCPP_CONFIG

Modified: libcxx/trunk/include/__locale
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__locale?rev=231897&r1=231896&r2=231897&view=diff
==============================================================================
--- libcxx/trunk/include/__locale (original)
+++ libcxx/trunk/include/__locale Tue Mar 10 19:51:06 2015
@@ -353,15 +353,13 @@ public:
     static const mask punct  = _PUNCT;
     static const mask xdigit = _HEX;
     static const mask blank  = _BLANK;
-#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) || defined(__ANDROID__)
+#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
 # ifdef __APPLE__
     typedef __uint32_t mask;
 # elif defined(__FreeBSD__)
     typedef unsigned long mask;
 # elif defined(__EMSCRIPTEN__) ||  defined(__NetBSD__)
     typedef unsigned short mask;
-# elif defined(__ANDROID__)
-    typedef unsigned char mask;
 # endif
     static const mask space  = _CTYPE_S;
     static const mask print  = _CTYPE_R;
@@ -371,11 +369,7 @@ public:
     static const mask alpha  = _CTYPE_A;
     static const mask digit  = _CTYPE_D;
     static const mask punct  = _CTYPE_P;
-# if defined(__ANDROID__)
-    static const mask xdigit = _CTYPE_X | _CTYPE_D;
-# else
     static const mask xdigit = _CTYPE_X;
-# endif
 
 # if defined(__NetBSD__)
     static const mask blank  = _CTYPE_BL;

Modified: libcxx/trunk/src/locale.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/locale.cpp?rev=231897&r1=231896&r2=231897&view=diff
==============================================================================
--- libcxx/trunk/src/locale.cpp (original)
+++ libcxx/trunk/src/locale.cpp Tue Mar 10 19:51:06 2015
@@ -1119,8 +1119,6 @@ ctype<char>::classic_table()  _NOEXCEPT
     return _ctype_ + 1;
 #elif defined(_AIX)
     return (const unsigned int *)__lc_ctype_ptr->obj->mask;
-#elif defined(__ANDROID__)
-    return reinterpret_cast<const unsigned char*>(_ctype_) + 1;
 #else
     // Platform not supported: abort so the person doing the port knows what to
     // fix





More information about the cfe-commits mailing list