Commit Graph

1037 Commits

Author SHA1 Message Date
David Blaikie
e27e907403 Fixing the MSan/compiler-rt build
Patch by Evgieniy Stepanov, review by İsmail Dönmez.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181740 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-13 21:53:44 +00:00
Howard Hinnant
b3585e8226 İsmail Dönmez: Enable quick_exit on linux.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181612 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-10 17:36:59 +00:00
David Dean
bb3a0acf93 XFAIL this test when using the darwin12 system library. Reviewed by Howard
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181610 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-10 17:25:57 +00:00
Marshall Clow
9f8f524541 Fix incorrect type usage; nice catch by Sebastian
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-10 00:16:10 +00:00
Joerg Sonnenberger
be764c946c Don't try to free the C locale.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-09 23:06:35 +00:00
Marshall Clow
b30abdd07a Implement n3607: 'equal', 'mismatch', and 'is_permutation'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181548 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-09 21:14:23 +00:00
Joerg Sonnenberger
5328cd307c Initialize codecvt explicitly with the C locale, which might not be 0.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181534 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-09 19:00:18 +00:00
Howard Hinnant
a7f5c1bcd8 Put a 1-character unget buffer into cin. This fixes http://llvm.org/bugs/show_bug.cgi?id=15867
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181470 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08 21:18:42 +00:00
Howard Hinnant
ecc9742f27 Constrain __invoke functions more accurately. This fixes http://llvm.org/bugs/show_bug.cgi?id=15861 .
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181377 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-07 23:40:12 +00:00
Howard Hinnant
5f1286f574 Introduce _LIBCPP_STD_VER. This can be set by the client (or the clang driver). Or it will be defaulted. The default is 11 if -std= c++11 or eariler, else it will default to the current year modulo the century. We anticipate it defaulting to 14 for C++14 when the time comes. For now, post-C++11 libcxx implementations should protect themselves with #if _LIBCPP_STD_VER > 11.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181347 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-07 20:16:13 +00:00
Howard Hinnant
dd854b2c4e Mark some tests with XFAIL for Lion and Mountain Lion.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181336 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-07 17:37:19 +00:00
Howard Hinnant
8c23819220 Expose accidentally removed __compressed_pair constructor taking piecewise_construct_t. This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 .
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181217 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 16:58:36 +00:00
Howard Hinnant
74f4da7219 Stephan Tolksdorf: fixes the issue in the <atomic> header and adds corresponding tests. I've used macros to fall back to a user-provided default constructor if _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS (though I suspect that there won't be many users defining that macro).
The tests use placement new to check that atomic values get properly zero-initialized. I had to modify the atomic_is_lock_free test, because default initialization of an object of const type 'const A' (aka 'const atomic<int>') requires a user-provided default constructor.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180945 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02 20:18:43 +00:00
Joerg Sonnenberger
e58bc12f2a The push/pop variant of pragma GCC diagnostic is only supported by Clang
and GCC 4.6 and newer, so protect accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180943 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02 19:34:26 +00:00
Joerg Sonnenberger
34cb066fa2 Make it possible to provide special (linker) flags for the thread tests.
Use it to build & link against libpthread on NetBSD for tests iff they
are testing the thread interface.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180942 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02 19:21:36 +00:00
Joerg Sonnenberger
63d8f7e341 Add explicit casts to unsigned char before calling ctype functions.
Fixes the value range on platforms with signed char.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02 19:17:48 +00:00
Howard Hinnant
15467189c3 This patch introduces an alternative layout for basic_string which when the string is short, the data pointer will be word-aligned. It can be activated with -D_LIBCPP_ALTERNATE_STRING_LAYOUT. These two different layouts (the default and _LIBCPP_ALTERNATE_STRING_LAYOUT) are not ABI compatible with each other. Once one is chosen for a given platform, it is disruptive to change it.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180811 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 21:44:48 +00:00
Joerg Sonnenberger
867deb8e06 Add entry for myself.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180728 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-29 19:55:32 +00:00
Joerg Sonnenberger
155f06018e Use protected version of the malloc attribute in case source wants to
define malloc as macro.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180727 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-29 19:52:08 +00:00
Joerg Sonnenberger
a9b94f1337 GCC doesn't support __has_attribute.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180683 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27 20:51:42 +00:00
Joerg Sonnenberger
912438c272 Use static_cast.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180680 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27 19:13:31 +00:00
Joerg Sonnenberger
d3b5b6b9f4 Use reinterpret_casts directly in place of C-style casts.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180679 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27 19:12:36 +00:00
Joerg Sonnenberger
006ab1e213 Only use Clang pragma when compiling with clang.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180678 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27 19:10:15 +00:00
Joerg Sonnenberger
df4182153c Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180598 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-26 09:40:18 +00:00
Howard Hinnant
a5f0e6c5c1 İsmail Dönmez: Change to mktemp template to make it compatible with Linux.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180267 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-25 16:08:55 +00:00
Howard Hinnant
05e7d24b3d default_delete needs a static_assert against void types. I had previously thought that sizeof(void) would take care of this. I was wrong.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180213 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-24 19:44:26 +00:00
Joerg Sonnenberger
c5e6aa5f5c Avoid bash specific functionality to work with any POSIX shell
implementing $(( )).


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180139 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23 19:53:24 +00:00
Bob Wilson
f9e75aef34 Change makefile comment to refer to libc++ instead of libcpp.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180135 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23 19:26:55 +00:00
Bob Wilson
9493e27c0f PR15820: Use tar instead of rsync to install the headers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180132 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23 18:51:51 +00:00
Bob Wilson
c52fb8d7bf PR12597: Remove "chown -R root:wheel" from the makefile.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180122 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23 17:30:35 +00:00
Howard Hinnant
9c2ce95063 Zero-initialize all mbstate_t in the codecvt tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180108 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23 14:09:35 +00:00
Howard Hinnant
08dd25303e Modest performance improvement for std::string's operator==.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180072 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22 23:55:13 +00:00
Howard Hinnant
5544f7e0c7 Somehow aligned_union got dropped through the cracks. This adds it. Did a drive-by fix of alignment_of while I was in the neighborhood.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180036 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22 19:37:49 +00:00
Howard Hinnant
b4e67cfd42 After years of telling people: 'If you ever find any of my code that self-move-assigns, send me a bug report.' Somebody finally took me up on it. vector::erase(begin(), begin()) does a self-move-assign of every element in the vector, leaving all of those elements in an unspecified state. I checked the other containers for this same bug and did not find it. Added test case.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179760 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18 15:02:57 +00:00
Howard Hinnant
2062f37772 I believe this finishes up debug mode for list. The testing is a little weak, but I believe all of the functionality is there. Certainly enough for people to checkout and start beating up on.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179632 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16 21:42:36 +00:00
Howard Hinnant
61fe0ac9b3 Added extra space to end of EXTRA_FLAGS in buildit. This fixes http://llvm.org/bugs/show_bug.cgi?id=15761
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179609 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16 17:34:20 +00:00
Howard Hinnant
4313ec3975 addressof misbehaving for type with an implicit conversion operator to char&. This fixes http://llvm.org/bugs/show_bug.cgi?id=15754
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179608 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16 17:27:56 +00:00
Howard Hinnant
ae57a1ab1d Numeric parsing was getting the wrong answer when faced with very long inputs. This fixes both http://llvm.org/bugs/show_bug.cgi?id=15751 and http://llvm.org/bugs/show_bug.cgi?id=15740
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-15 20:40:06 +00:00
Howard Hinnant
993248935c Accidentally disallowed explicit tuple conversions when all elements of the tuple can be explicitly converted.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179467 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-14 00:01:13 +00:00
Howard Hinnant
4f67100219 Set failbit when strtold sets errno to ERANGE when parsing floating point values.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13 18:19:25 +00:00
Howard Hinnant
a5733b3ad3 Ruben Van Boxem: Turn islower_l and isupper_l into functions (instead of macros) on Windows only to quell a warning during libc++ building.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179408 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12 20:22:57 +00:00
Howard Hinnant
0795931dee Change <cwchar> and <cstring> to look out for flags which may or may not be set by the C headers <wchar.h> and <string.h> indicating C support for the C++-altered wcschr, wcspbrk, wcsrchr, wcsstr, wmemchr, strchr, strpbrk, strrchr, memchr, and strstr. This was already done in <cstring> for other platforms using other flags, so just had to add one more flag to the list there.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179041 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 18:59:28 +00:00
Howard Hinnant
6dcaf3ee1a Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178892 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 17:58:52 +00:00
Howard Hinnant
e1e96cb840 More list debug mode tests.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178873 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 15:04:10 +00:00
Howard Hinnant
79a35570a5 More work on debug mode for list.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178819 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 00:18:49 +00:00
Howard Hinnant
128f7bf4fa Somehow search_n never got tested, so of course it had a bug in it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15667.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178764 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-04 15:40:48 +00:00
Howard Hinnant
c5e8961a35 Fix stupid but harmless type-o. Fixes http://llvm.org/bugs/show_bug.cgi?id=15657.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178691 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-03 20:29:45 +00:00
Howard Hinnant
4aa8b06e67 The move / swap members were not correctly taking all of the possible states of the basic_stringbuf into account. Just rewrote these members. Test included. This fixes http://llvm.org/bugs/show_bug.cgi?id=15659.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178690 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-03 20:21:29 +00:00
Howard Hinnant
cf31d3864e Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077133.html
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178581 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 22:14:51 +00:00
Howard Hinnant
b777d6a4b2 The cmake script is failing to copy cxxabi.h to the right place because it was generating to destination path like so /include// and dstdir can legally be blank from my interpretation of the script, and this would then generate a path like libcxx/include// which is illegal.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178579 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 21:33:01 +00:00