summaryrefslogtreecommitdiffstats
path: root/libcxx/src
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2015-03-04 16:10:14 +0000
committerMarshall Clow <mclow.lists@gmail.com>2015-03-04 16:10:14 +0000
commit66599d8ea891025e922eced18851c8a7670bf2df (patch)
tree9c102044c7efb42ed91799c03c27c410e3ce87fe /libcxx/src
parent5c585253e5f66affee0ce1d3db18ea2cfdfcdd82 (diff)
downloadbcm5719-llvm-66599d8ea891025e922eced18851c8a7670bf2df.tar.gz
bcm5719-llvm-66599d8ea891025e922eced18851c8a7670bf2df.zip
Create a default rune table for libc++. Initial setting - never enabled. The expectation is that some targets (Android, cough) will enable it. Note that this is an implementation detail, not an interface change.
llvm-svn: 231252
Diffstat (limited to 'libcxx/src')
-rw-r--r--libcxx/src/locale.cpp82
1 files changed, 82 insertions, 0 deletions
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 83052f605a6..d63df2045f9 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -1016,6 +1016,87 @@ extern "C" const int ** __ctype_tolower_loc();
extern "C" const int ** __ctype_toupper_loc();
#endif
+#ifdef _LIBCPP_HAS_DEFAULT_RUNE_TABLE
+const ctype<char>::mask*
+ctype<char>::classic_table() _NOEXCEPT
+{
+ static _LIBCPP_CONSTEXPR const ctype<char>::mask builtin_table[table_size] = {
+ cntrl, cntrl,
+ cntrl, cntrl,
+ cntrl, cntrl,
+ cntrl, cntrl,
+ cntrl, cntrl | space | blank,
+ cntrl | space, cntrl | space,
+ cntrl | space, cntrl | space,
+ cntrl, cntrl,
+ cntrl, cntrl,
+ cntrl, cntrl,
+ cntrl, cntrl,
+ cntrl, cntrl,
+ cntrl, cntrl,
+ cntrl, cntrl,
+ cntrl, cntrl,
+ cntrl, cntrl,
+ space | blank | print, punct | print,
+ punct | print, punct | print,
+ punct | print, punct | print,
+ punct | print, punct | print,
+ punct | print, punct | print,
+ punct | print, punct | print,
+ punct | print, punct | print,
+ punct | print, punct | print,
+ digit | print | xdigit, digit | print | xdigit,
+ digit | print | xdigit, digit | print | xdigit,
+ digit | print | xdigit, digit | print | xdigit,
+ digit | print | xdigit, digit | print | xdigit,
+ digit | print | xdigit, digit | print | xdigit,
+ punct | print, punct | print,
+ punct | print, punct | print,
+ punct | print, punct | print,
+ punct | print, upper | xdigit | print | alpha,
+ upper | xdigit | print | alpha, upper | xdigit | print | alpha,
+ upper | xdigit | print | alpha, upper | xdigit | print | alpha,
+ upper | xdigit | print | alpha, upper | print | alpha,
+ upper | print | alpha, upper | print | alpha,
+ upper | print | alpha, upper | print | alpha,
+ upper | print | alpha, upper | print | alpha,
+ upper | print | alpha, upper | print | alpha,
+ upper | print | alpha, upper | print | alpha,
+ upper | print | alpha, upper | print | alpha,
+ upper | print | alpha, upper | print | alpha,
+ upper | print | alpha, upper | print | alpha,
+ upper | print | alpha, upper | print | alpha,
+ upper | print | alpha, punct | print,
+ punct | print, punct | print,
+ punct | print, punct | print,
+ punct | print, lower | xdigit | print | alpha,
+ lower | xdigit | print | alpha, lower | xdigit | print | alpha,
+ lower | xdigit | print | alpha, lower | xdigit | print | alpha,
+ lower | xdigit | print | alpha, lower | print | alpha,
+ lower | print | alpha, lower | print | alpha,
+ lower | print | alpha, lower | print | alpha,
+ lower | print | alpha, lower | print | alpha,
+ lower | print | alpha, lower | print | alpha,
+ lower | print | alpha, lower | print | alpha,
+ lower | print | alpha, lower | print | alpha,
+ lower | print | alpha, lower | print | alpha,
+ lower | print | alpha, lower | print | alpha,
+ lower | print | alpha, lower | print | alpha,
+ lower | print | alpha, punct | print,
+ punct | print, punct | print,
+ punct | print, cntrl,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ return builtin_table;
+}
+#else
const ctype<char>::mask*
ctype<char>::classic_table() _NOEXCEPT
{
@@ -1049,6 +1130,7 @@ ctype<char>::classic_table() _NOEXCEPT
return NULL;
#endif
}
+#endif
#if defined(__GLIBC__)
const int*
OpenPOWER on IntegriCloud