Commit Graph

986 Commits

Author SHA1 Message Date
Howard Hinnant 9d3ccc700f Neglected to remove a debugging comment from last commit.
llvm-svn: 182422
2013-05-21 21:19:35 +00:00
Howard Hinnant 849821cffb Fix a couple of bugs in linear_congruential_engine::seed. Regression test added.
llvm-svn: 182421
2013-05-21 21:05:12 +00:00
Joerg Sonnenberger 50544e7e65 Add NetBSD support.
llvm-svn: 182162
2013-05-17 21:17:34 +00:00
Joerg Sonnenberger df6bbaa528 Create a weak pthread_create reference on NetBSD to not force a
dependency on libpthread for code that doesn't use threads itself.

llvm-svn: 182161
2013-05-17 21:16:18 +00:00
Howard Hinnant 9daaf5775c Glen: This patch gets the string conversion functions working on Windows. It also refactors repetitive code in string.cpp do greatly reduce the repetitiveness, increasing maintainability.
llvm-svn: 182026
2013-05-16 17:13:40 +00:00
Howard Hinnant 0125ab809f Remove cv qualifiers from member pointers in the __member_pointer_traits test. This was causing a const-qualified bind result to malfunction. This was a recent regression due to the new use of __member_pointer_traits in restricting the __invokable and __invoke_of tests.
llvm-svn: 181935
2013-05-15 21:49:27 +00:00
David Blaikie f13dbe4799 Fixing the MSan/compiler-rt build
Patch by Evgieniy Stepanov, review by İsmail Dönmez.

llvm-svn: 181740
2013-05-13 21:53:44 +00:00
Howard Hinnant 9449989601 İsmail Dönmez: Enable quick_exit on linux.
llvm-svn: 181612
2013-05-10 17:36:59 +00:00
David Dean a9ac518364 XFAIL this test when using the darwin12 system library. Reviewed by Howard
llvm-svn: 181610
2013-05-10 17:25:57 +00:00
Marshall Clow fce85ba455 Fix incorrect type usage; nice catch by Sebastian
llvm-svn: 181569
2013-05-10 00:16:10 +00:00
Joerg Sonnenberger dd6a025986 Don't try to free the C locale.
llvm-svn: 181559
2013-05-09 23:06:35 +00:00
Marshall Clow 0b0bbd2f22 Implement n3607: 'equal', 'mismatch', and 'is_permutation'
llvm-svn: 181548
2013-05-09 21:14:23 +00:00
Joerg Sonnenberger 8a5a9dfb5d Initialize codecvt explicitly with the C locale, which might not be 0.
llvm-svn: 181534
2013-05-09 19:00:18 +00:00
Howard Hinnant 266abefed0 Put a 1-character unget buffer into cin. This fixes http://llvm.org/bugs/show_bug.cgi?id=15867
llvm-svn: 181470
2013-05-08 21:18:42 +00:00
Howard Hinnant 866ed94db1 Constrain __invoke functions more accurately. This fixes http://llvm.org/bugs/show_bug.cgi?id=15861 .
llvm-svn: 181377
2013-05-07 23:40:12 +00:00
Howard Hinnant 81aa5cb804 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.
llvm-svn: 181347
2013-05-07 20:16:13 +00:00
Howard Hinnant 6b1455f6f1 Mark some tests with XFAIL for Lion and Mountain Lion.
llvm-svn: 181336
2013-05-07 17:37:19 +00:00
Howard Hinnant eedfabd96e Expose accidentally removed __compressed_pair constructor taking piecewise_construct_t. This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 .
llvm-svn: 181217
2013-05-06 16:58:36 +00:00
Howard Hinnant da9ca0b405 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.

llvm-svn: 180945
2013-05-02 20:18:43 +00:00
Joerg Sonnenberger f380515753 The push/pop variant of pragma GCC diagnostic is only supported by Clang
and GCC 4.6 and newer, so protect accordingly.

llvm-svn: 180943
2013-05-02 19:34:26 +00:00
Joerg Sonnenberger 087e35ec03 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.

llvm-svn: 180942
2013-05-02 19:21:36 +00:00
Joerg Sonnenberger aa05f9eaf3 Add explicit casts to unsigned char before calling ctype functions.
Fixes the value range on platforms with signed char.

llvm-svn: 180940
2013-05-02 19:17:48 +00:00
Howard Hinnant 35abaab7d3 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.
llvm-svn: 180811
2013-04-30 21:44:48 +00:00
Joerg Sonnenberger 3f9d685941 Add entry for myself.
llvm-svn: 180728
2013-04-29 19:55:32 +00:00
Joerg Sonnenberger 21883e9478 Use protected version of the malloc attribute in case source wants to
define malloc as macro.

llvm-svn: 180727
2013-04-29 19:52:08 +00:00
Joerg Sonnenberger a39fe8c59e GCC doesn't support __has_attribute.
llvm-svn: 180683
2013-04-27 20:51:42 +00:00
Joerg Sonnenberger 85ad6c99c7 Use static_cast.
llvm-svn: 180680
2013-04-27 19:13:31 +00:00
Joerg Sonnenberger 2ed7030c1a Use reinterpret_casts directly in place of C-style casts.
llvm-svn: 180679
2013-04-27 19:12:36 +00:00
Joerg Sonnenberger ff3ce2bdc0 Only use Clang pragma when compiling with clang.
llvm-svn: 180678
2013-04-27 19:10:15 +00:00
Joerg Sonnenberger f53c3ca9eb Fix typos.
llvm-svn: 180598
2013-04-26 09:40:18 +00:00
Howard Hinnant a2ee3a6e2e İsmail Dönmez: Change to mktemp template to make it compatible with Linux.
llvm-svn: 180267
2013-04-25 16:08:55 +00:00
Howard Hinnant 03ec04f9b5 default_delete needs a static_assert against void types. I had previously thought that sizeof(void) would take care of this. I was wrong.
llvm-svn: 180213
2013-04-24 19:44:26 +00:00
Joerg Sonnenberger 4341ad3500 Avoid bash specific functionality to work with any POSIX shell
implementing $(( )).

llvm-svn: 180139
2013-04-23 19:53:24 +00:00
Bob Wilson 5a348a12bd Change makefile comment to refer to libc++ instead of libcpp.
llvm-svn: 180135
2013-04-23 19:26:55 +00:00
Bob Wilson 03fa38aa5b PR15820: Use tar instead of rsync to install the headers.
llvm-svn: 180132
2013-04-23 18:51:51 +00:00
Bob Wilson 01fee349d9 PR12597: Remove "chown -R root:wheel" from the makefile.
llvm-svn: 180122
2013-04-23 17:30:35 +00:00
Howard Hinnant f8bb3e522d Zero-initialize all mbstate_t in the codecvt tests.
llvm-svn: 180108
2013-04-23 14:09:35 +00:00
Howard Hinnant 210051548e Modest performance improvement for std::string's operator==.
llvm-svn: 180072
2013-04-22 23:55:13 +00:00
Howard Hinnant 20428e94e0 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.
llvm-svn: 180036
2013-04-22 19:37:49 +00:00
Howard Hinnant ab65a6f560 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.
llvm-svn: 179760
2013-04-18 15:02:57 +00:00
Howard Hinnant 9a20da75ef 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.
llvm-svn: 179632
2013-04-16 21:42:36 +00:00
Howard Hinnant c5894133bc Added extra space to end of EXTRA_FLAGS in buildit. This fixes http://llvm.org/bugs/show_bug.cgi?id=15761
llvm-svn: 179609
2013-04-16 17:34:20 +00:00
Howard Hinnant c76d2bda6f addressof misbehaving for type with an implicit conversion operator to char&. This fixes http://llvm.org/bugs/show_bug.cgi?id=15754
llvm-svn: 179608
2013-04-16 17:27:56 +00:00
Howard Hinnant e7389a6915 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
llvm-svn: 179556
2013-04-15 20:40:06 +00:00
Howard Hinnant f3b02b17af Accidentally disallowed explicit tuple conversions when all elements of the tuple can be explicitly converted.
llvm-svn: 179467
2013-04-14 00:01:13 +00:00
Howard Hinnant 40487ca25e Set failbit when strtold sets errno to ERANGE when parsing floating point values.
llvm-svn: 179461
2013-04-13 18:19:25 +00:00
Howard Hinnant 24afdf71c1 Ruben Van Boxem: Turn islower_l and isupper_l into functions (instead of macros) on Windows only to quell a warning during libc++ building.
llvm-svn: 179408
2013-04-12 20:22:57 +00:00
Howard Hinnant 98381453c0 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.
llvm-svn: 179041
2013-04-08 18:59:28 +00:00
Howard Hinnant f750923161 Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.
llvm-svn: 178892
2013-04-05 17:58:52 +00:00
Howard Hinnant 1b81829979 More list debug mode tests.
llvm-svn: 178873
2013-04-05 15:04:10 +00:00