Move Android to the builtin rune table.
authorDan Albert <danalbert@google.com>
Wed, 11 Mar 2015 00:51:06 +0000 (00:51 +0000)
committerDan Albert <danalbert@google.com>
Wed, 11 Mar 2015 00:51:06 +0000 (00:51 +0000)
llvm-svn: 231897

libcxx/include/__config
libcxx/include/__locale
libcxx/src/locale.cpp

index c1055181203517d51d12e0f12b9a67c6c4e14e66..5dc6c8214f40f23b8a3fb93583460fd31904772a 100644 (file)
@@ -719,4 +719,8 @@ extern "C" void __sanitizer_annotate_contiguous_container(
          _LIBCPP_HAS_NO_THREADS is defined.
 #endif
 
+#if defined(__ANDROID__)
+#define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
+#endif
+
 #endif  // _LIBCPP_CONFIG
index 4efdc2d410fca8d0561e91554034155f52a2a669..625d0f85e1d0ff4a1c90c84afd424a1840ba79d9 100644 (file)
@@ -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;
index 2115340f0b55aeea7fe376ff48094380332981af..729022689adfe0797655f929019620b3d3ed1da3 100644 (file)
@@ -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