Commit Graph

54 Commits

Author SHA1 Message Date
Jonathan Roelofs
6fb33ea8fb Fix ctype_byname<wchar_t>::do_is() mask checking.... again
This basically reverts the revert in r216508, and fixes a few more cases while
I'm at it. Reading my commit message on that commit again, I think it's bupkis.

http://reviews.llvm.org/D8237


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231940 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-11 17:00:28 +00:00
Dan Albert
6272ae58fe Move Android to the builtin rune table.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231897 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-11 00:51:06 +00:00
JF Bastien
a14f7cb412 libc++: support newlib's ctype
Summary: Newlib supports ctype differently from other platforms, this patch teaches libc++ about yet another platform that does ctype differently.

Reviewers: jroelofs

Subscribers: cfe-commits, danalbert, EricWF, jvoung, jfb, mclow.lists

Differential Revision: http://reviews.llvm.org/D7888

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@230557 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-25 22:16:46 +00:00
Eric Fiselier
f51d676a0e Get libc++ building on Sun Solaris. Patch from C Bergstrom.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@226947 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-23 22:22:36 +00:00
Marshall Clow
e42202138c Change a couple more template parameter names from 'T' to '_Tp', etc. Thanks to Ondřej Majerech for the patch, but I did a bit more.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@225598 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-11 06:15:59 +00:00
Sergey Dmitrouk
984f8f6e43 Include newlib-specific locales in __locale
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224111 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-12 08:36:16 +00:00
Eric Fiselier
6cb69ffa0a Fixes to get libc++ building on sun solaris. Patch from C Bergstrom.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222794 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-25 21:57:41 +00:00
Dan Albert
3ab406107d Make Android's ctype_base::mask unsigned.
Keeping the regex code sane is much easier if we match the other
platforms and use an unsigned mask.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214442 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 21:04:08 +00:00
Dan Albert
2a52a3237f Fix ctype_base::xdigit for Android.
Android's ctype implementation comes from openbsd, which for some reason
doesn't consider numbers to be hex digits.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213785 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-23 19:32:03 +00:00
Marshall Clow
a64392627e Add support for BIONIC C library (Android). Patch from Dan Albert
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@212724 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-10 15:20:28 +00:00
Marshall Clow
be3d117702 Fix misguided #elif - it checked the value of _AIX instead of defined(_AIX). Thanks to Johan Bergström for the bug report.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@203589 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-11 17:18:47 +00:00
Marshall Clow
2ccffefaff 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@195136 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 18:05:03 +00:00
Marshall Clow
8a43fca8ed Patch by GM: Making implicit conversion to bool explicit in <ios> and <__locale>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@193085 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-21 14:41:05 +00:00
Howard Hinnant
ef5aa93b9c G M: Restore the ability for libcxx to compile again on mingw 64.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@190837 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-17 01:34:47 +00:00
Howard Hinnant
cb0e6b65a8 Xing Xue: Fix type-o. Thanks to C. Bergström for spotting it.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189674 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 14:42:39 +00:00
Howard Hinnant
5143722d14 Xing Xue: Some minor changes for IBM XLC++/AIX.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189623 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-29 23:37:50 +00:00
Howard Hinnant
499cea12bb Debug mode for string. This commit also marks the first time libc++ debug-mode has found a bug (found one in regex). Had to play with extern templates a bit to get this to work since string is heavily used within libc++.dylib.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@189114 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-23 17:37:05 +00:00
Howard Hinnant
7f76450ee9 Xing Xue: port to IBM XLC++/AIX.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188396 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14 18:00:20 +00:00
Howard Hinnant
0f678bd69e Nico Rieck: this patch series fixes visibility issues on Windows as explained in <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-August/031214.html>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@188192 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-12 18:38:34 +00:00
Howard Hinnant
e9df0a5c6c Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which is
MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can
also define _MSC_VER, and MSVCRT is not necessarily the only C runtime,
these macros should not be used interchangeably.

This patch divides all Windows-related bits into the aforementioned
categories. Two new macros are introduced:

- _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using
  _MSC_VER, excluding Clang.
- _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default
   when _WIN32 is defined.

This leaves _WIN32 for code using the Windows API.

This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF.

Nico, please prepare a patch for CREDITS.TXT, thanks.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 18:17:34 +00:00
Joerg Sonnenberger
a71a952634 Add NetBSD support.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182162 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-17 21:17:34 +00:00
Howard Hinnant
fc2f021bdd Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178354 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-29 18:27:28 +00:00
Marshall Clow
53e2763966 Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177310 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 19:34:07 +00:00
Marshall Clow
dece7fe670 Removed raw references to __APPLE__; now just check to see if it is defined.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:45:34 +00:00
Marshall Clow
a22d2addb1 Removed raw references to _WIN32; now just check to see if it is defined.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177291 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:04:29 +00:00
Howard Hinnant
83eade6abb No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 23:30:19 +00:00
Howard Hinnant
ff9267709d Provide a way to disable use of extern templates in libc++. This is intended for the clients of libc++, not the libc++ build. The dylib should always contain the extern templates. To disable the client needs to put -D'_LIBCPP_EXTERN_TEMPLATE(...)=' on the command line.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167486 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-06 21:08:48 +00:00
Howard Hinnant
33be35effe Dimitry Andric: many visibility fixes. Howard: Much appreciated. Can you send me a patch to CREDITS.TXT?
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@163862 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-14 00:39:16 +00:00
Howard Hinnant
f3d62ea57f locale::id really needs to be constructed at compile time.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160785 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-26 16:14:37 +00:00
David Chisnall
997e454139 Solaris port. Currently sees around 200 test failures, mostly related to
Solaris not providing some of the locales that the test suite uses.

Note: This depends on an xlocale (partial) implementation for Solaris and a
couple of fixed standard headers.  These will be committed to a branch later
today.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151720 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 13:05:08 +00:00
Howard Hinnant
ec3773c2da Quash a whole bunch of warnings
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145624 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-01 20:21:04 +00:00
Howard Hinnant
9996844df0 Further macro protection by replacing _[A-Z] with _[A-Z]p
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@145410 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-29 18:15:50 +00:00
Howard Hinnant
08e17472e4 Windows support by Ruben Van Boxem.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@142235 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-17 20:05:10 +00:00
Howard Hinnant
11624459ef Starting on musl port by Arvid Picciani
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@141672 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11 16:00:46 +00:00
Howard Hinnant
14fa9f9d8f Windows port work by Ruben Van Boxem
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140805 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 20:33:10 +00:00
Howard Hinnant
3c466fc631 Windows patch work by Ruben Van Boxem
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140781 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-29 13:33:15 +00:00
Howard Hinnant
866569b8c3 Attempted locale refactoring. _LIBCPP_LOCALE__L_EXTENSIONS now should be defined if one has all of the xxx_l() functions. I've defined this for apple, freebsd and win32. _LIBCPP_HAS_DEFAULTRUNELOCALE should be defined if there is a _DefaultRuneLocale. I've defined this for apple and freebsd. The block of code we're trying to migrate away from is now under #ifdef __linux__. I've tested only on OS X. I hope I haven't broken things too badly elsewhere. Please let me know.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140734 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28 23:39:33 +00:00
Howard Hinnant
92a07003b2 Partial Windows port by Ruben Van Boxem
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140328 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-22 19:10:18 +00:00
David Chisnall
c512df1950 Fixes for FreeBSD, including some fairly obvious copy-and-paste errors.
libc++ now mostly works on FreeBSD with libcxxrt and this patch applied to the base system:

http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20110920/e666632c/xlocale-0001.obj

Summary of tests on FreeBSD:


****************************************************
Results for /root/libcxx/test:
using FreeBSD clang version 3.0 (trunk 135360) 20110717
Target: x86_64-unknown-freebsd9.0
Thread model: posix
with -std=c++0x -stdlib=libc++ -I/root/libcxx/include -L/root/libcxx/build/lib
----------------------------------------------------
sections without tests   : 1
sections with failures   : 48
sections without failures: 1015
                       +   ----
total number of sections : 1064
----------------------------------------------------
number of tests failed   : 145
number of tests passed   : 4179
                       +   ----
total number of tests    : 4324
****************************************************

(Many due to this clang version not supporting C++ atomics)

More fixes to follow...



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140245 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-21 08:39:44 +00:00
David Chisnall
68ebc448f0 Enable __locale to work on FreeBSD.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140005 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-18 19:23:04 +00:00
Sean Hunt
e59f724f79 Conditionally wrap the changes from r134781.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134783 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-09 01:09:31 +00:00
Sean Hunt
62a6ac33a2 Implement generalized table lookups for upper, lower, and character
traits.

To the best of my knowledge, this will not break the ABI for Apple.
However, it does introduce three publicly visible (although with
reserved name) functions that will fail to link against the just-shipped
Apple version of libc++. Since they are not used in any inline
functions, no actual breakage should occur.

If Howard doesn't want to put undefined functions (even internal ones)
into a header, they could be surrounded by additional conditional
compilation.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134781 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-09 00:56:23 +00:00
Howard Hinnant
0949eedbd6 _STD -> _VSTD to avoid macro clash on windows
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134190 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-30 21:18:19 +00:00
Howard Hinnant
c983454d30 noexcept for Chapter 22 [localization].
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132337 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 15:34:58 +00:00
Howard Hinnant
1694d23e23 noexcept for <memory>. I've added a few extension noexcept to: allocator_traits<A>::deallocate, allocaate<T>::deallocate, return_temporary_buffer, and default_delete<T>::operator()(T*) const. My rationale was: If a std-dicated noexcept function needs to call another std-defined function, that called function must be noexcept. We're all a little new to noexcept, so things like this are to be expected. Also included fix for broken __is_swappable trait pointed out by Marc Glisse, thanks Marc|. And fixed a test case for is_nothrow_destructible. Destructors are now noexcept by default|
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132261 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-28 14:41:13 +00:00
Howard Hinnant
2d72b1e393 Effort to reduce the number of exported symbols
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@122057 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 14:46:43 +00:00
Howard Hinnant
b64f8b07c1 license change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 22:09:02 +00:00
Howard Hinnant
b0be42b2ce visibility-decoration.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@114465 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-21 18:58:51 +00:00
Howard Hinnant
324bb03bb9 Fixing whitespace problems
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@111750 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-22 00:02:43 +00:00
Howard Hinnant
d444470d6c now works with -fno-exceptions and -fno-rtti
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@110828 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 17:04:31 +00:00