summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2017-07-24 11:57:50 -0700
committerDan Albert <danalbert@google.com>2017-07-24 13:17:12 -0700
commit6c8ba1cef1a3ba3f902272803e7b5871dac19aaa (patch)
treed9c4434610d305416d5c1d6ce9993703c298491f
parent69b5972b6ef8489ee4351b585fe8e7d19a492e46 (diff)
downloadexternal_libcxx-6c8ba1cef1a3ba3f902272803e7b5871dac19aaa.tar.gz
external_libcxx-6c8ba1cef1a3ba3f902272803e7b5871dac19aaa.tar.bz2
external_libcxx-6c8ba1cef1a3ba3f902272803e7b5871dac19aaa.zip
Fix list of source files.
* functional.cpp currently only contains things that are not used by the libc++ ABI version we currently use. * variant.cpp is for C++1z stuff that we aren't testing yet. * vector.cpp is new with the latest rebase. Also remove a support source we no longer need. We use libc++'s builtin ctype table now. Test: ndk/run_tests.py Bug: None Change-Id: Ib077c81730b7a037b1195e2582f56f6911494196
-rw-r--r--Android.mk4
-rw-r--r--src/support/android/locale_android.cpp115
2 files changed, 3 insertions, 116 deletions
diff --git a/Android.mk b/Android.mk
index 77328f095..ac0fde5e9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -27,6 +27,7 @@ libcxx_sources := \
condition_variable.cpp \
debug.cpp \
exception.cpp \
+ functional.cpp \
future.cpp \
hash.cpp \
ios.cpp \
@@ -47,7 +48,8 @@ libcxx_sources := \
typeinfo.cpp \
utility.cpp \
valarray.cpp \
- support/android/locale_android.cpp
+ variant.cpp \
+ vector.cpp \
libcxx_sources := $(libcxx_sources:%=src/%)
diff --git a/src/support/android/locale_android.cpp b/src/support/android/locale_android.cpp
deleted file mode 100644
index 940261af6..000000000
--- a/src/support/android/locale_android.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-// -*- C++ -*-
-//===------------------ support/win32/locale_android32.cpp ----------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include <ctype.h>
-
-// Bionic exports the non-standard _ctype_ array in <ctype.h>,
-// unfortunately, cannot be used directly for libc++ because it doesn't
-// have a proper bit-flag for blank characters.
-//
-// Note that the header does define a _B flag (as 0x80), but it
-// is only set on the space (32) character, and used to implement
-// isprint() properly. The implementation of isblank() relies on
-// direct comparisons with 9 and 32 instead.
-//
-// The following is a local copy of the Bionic _ctype_ array that has
-// been modified in the following way:
-//
-// - It stores 16-bit unsigned values, instead of 8-bit char ones.
-//
-// - Bit flag _BLANK (0x100) is used to indicate blank characters.
-// It is only set for indices 9 (TAB) and 32 (SPACE).
-//
-// - Support signed char properly for indexing.
-
-// Used to tag blank characters, this doesn't appear in <ctype.h> nor
-// the original Bionic _ctype_ array.
-#define _BLANK 0x100
-
-// NOTE: A standalone forward declaration is required to ensure that this
-// variable is properly exported with a C name. In other words, this does
-// _not_ work:
-//
-// extern "C" {
-// const char* const _ctype_android = ...;
-// }
-//
-extern "C" const unsigned short* const _ctype_android;
-
-#if !defined(_U)
-# if !defined(_CTYPE_U)
-# error Bionic header ctype.h does not define either _U nor _CTYPE_U
-# endif
-# define _U _CTYPE_U
-# define _L _CTYPE_L
-# define _N _CTYPE_N
-# define _S _CTYPE_S
-# define _P _CTYPE_P
-# define _C _CTYPE_C
-# define _X _CTYPE_X
-# define _B _CTYPE_B
-#endif
-
-static const unsigned short ctype_android_tab[256+128] = {
- /* -128..-1 */
- _C, _C, _C, _C, _C, _C, _C, _C, /* 80 */
- _C, _C, _C, _C, _C, _C, _C, _C, /* 88 */
- _C, _C, _C, _C, _C, _C, _C, _C, /* 90 */
- _C, _C, _C, _C, _C, _C, _C, _C, /* 98 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* A0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* A8 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* B0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* B8 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* C0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* C8 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* D0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* D8 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* E0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* E8 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* F0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* F8 */
- /* 0..127 */
- _C, _C, _C, _C, _C, _C, _C, _C,
- _C, _C|_S|_BLANK, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C,
- _C, _C, _C, _C, _C, _C, _C, _C,
- _C, _C, _C, _C, _C, _C, _C, _C,
- _S|_B|_BLANK, _P, _P, _P, _P, _P, _P, _P,
- _P, _P, _P, _P, _P, _P, _P, _P,
- _N, _N, _N, _N, _N, _N, _N, _N,
- _N, _N, _P, _P, _P, _P, _P, _P,
- _P, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U|_X, _U,
- _U, _U, _U, _U, _U, _U, _U, _U,
- _U, _U, _U, _U, _U, _U, _U, _U,
- _U, _U, _U, _P, _P, _P, _P, _P,
- _P, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L|_X, _L,
- _L, _L, _L, _L, _L, _L, _L, _L,
- _L, _L, _L, _L, _L, _L, _L, _L,
- /* determine printability based on the IS0 8859 8-bit standard */
- _L, _L, _L, _P, _P, _P, _P, _C,
- /* 128..255, same as -128..127 */
- _C, _C, _C, _C, _C, _C, _C, _C, /* 80 */
- _C, _C, _C, _C, _C, _C, _C, _C, /* 88 */
- _C, _C, _C, _C, _C, _C, _C, _C, /* 90 */
- _C, _C, _C, _C, _C, _C, _C, _C, /* 98 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* A0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* A8 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* B0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* B8 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* C0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* C8 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* D0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* D8 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* E0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* E8 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* F0 */
- _P, _P, _P, _P, _P, _P, _P, _P, /* F8 */
-};
-
-const unsigned short* const _ctype_android = ctype_android_tab + 128;