summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a bit of UB in __independent_bits_engine. Fixes PR#34663Marshall Clow2017-09-201-2/+3
| | | | llvm-svn: 313776
* Make libcxx tests work when llvm sources are not present.Zachary Turner2017-09-201-7/+10
| | | | | | | | | | | | | | | | | | | Despite a strong CMake warning that this is an unsupported libcxx build configuration, some bots still rely on being able to check out lit and libcxx independently with no LLVM sources, and then run lit against libcxx. A previous patch broke that workflow, so this is making it work again. Unfortunately, it breaks generation of the llvm-lit script for libcxx, but we will just have to live with that until a solution is found that allows libcxx to make more use of llvm build pieces. libcxx can still run tests by using the ninja check target, or by running lit.py directly against the build tree or source tree. Differential Revision: https://reviews.llvm.org/D38057 llvm-svn: 313763
* [libc++] Replace __sync_* functions with __libcpp_atomic_* functionsWeiming Zhao2017-09-197-12/+34
| | | | | | | | | | | | | | | | Summary: This patch replaces __sync_* with __libcpp_atomic_* and adds a wrapper function for __atomic_exchange to support _LIBCPP_HAS_NO_THREADS. Reviewers: EricWF, jroelofs, mclow.lists, compnerd Reviewed By: EricWF, compnerd Subscribers: compnerd, efriedma, cfe-commits, joerg, llvm-commits Differential Revision: https://reviews.llvm.org/D35235 llvm-svn: 313694
* Resubmit "Fix llvm-lit script generation in libcxx."Zachary Turner2017-09-193-3/+17
| | | | | | | | After speaking with the libcxx owners, they agreed that this is a bug in the bot that needs to be fixed by the bot owners, and the CMake changes are correct. llvm-svn: 313643
* Revert "Fix llvm-lit script generation in libcxx."Zachary Turner2017-09-193-17/+3
| | | | | | | | | | | | This reverts commit 4ad71811d45268d81b60f27e3b8b2bcbc23bd7b9. There is a bot that is checking out libcxx and lit with nothing else and then running lit.py against the test tree. Since there's no LLVM source tree, there's no LLVM CMake. CMake actually reports this as a warning saying unsupported libcxx configuration, but I guess someone is depending on it anyway. llvm-svn: 313607
* Fix llvm-lit script generation in libcxx.Zachary Turner2017-09-193-3/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D37997 llvm-svn: 313606
* Fix failing ASAN testEric Fiselier2017-09-181-2/+5
| | | | llvm-svn: 313576
* Fix two failing -verify tests to tolerate old and new clang versionsEric Fiselier2017-09-172-5/+5
| | | | llvm-svn: 313502
* Update changelog revisionEric Fiselier2017-09-171-1/+1
| | | | llvm-svn: 313501
* ABI: Fix for undefined "___cxa_deleted_virtual" symbol in MacOSXEric Fiselier2017-09-176-0/+30
| | | | | | | | | | | | | | | | | | | | | | Patch from Eddie Elizondo. Reviewed as D37830 (https://reviews.llvm.org/D37830). On MacOSX the following program: struct S { virtual void f() = delete; }; int main() { new S; } Fails with the following error: Undefined symbols for architecture x86_64: "___cxa_deleted_virtual" This adds a fix to export the needed symbols. Test: > lit -sv test/libcxx/language.support/cxa_deleted_virtual.pass.cpp > Testing Time: 0.21s > Expected Passes : 1 llvm-svn: 313500
* Fix failing -verify tests due to change in Clangs static_assert message.Eric Fiselier2017-09-1712-41/+41
| | | | | | | | Clang recently changed the way it outputs static assert diagnostics. This patch fixes libc++'s -verify tests so they tolerate both the old and new message format. llvm-svn: 313499
* [libc++] Account for Microsoft CRT const overloadsShoaib Meenai2017-09-151-0/+4
| | | | | | | | | | Microsoft's CRT already provides the const overloads, and it defines the `_CRT_CONST_CORRECT_OVERLOADS` macro to indicate their presence. Check for this macro before attempting to define our own const-correct overloads, to avoid compiler warnings about casts dropping const qualifiers. llvm-svn: 313377
* [libc++] Remove unnecessary struct tagShoaib Meenai2017-09-151-1/+1
| | | | | | It causes warnings about mismatched tags, and it's not needed. llvm-svn: 313345
* typeinfo: provide a partial implementation for Win32Saleem Abdulrasool2017-09-153-10/+99
| | | | | | | | | | | | | | | | | The RTTI structure is different on Windows when building under MS ABI. Update the definition to reflect this. The structure itself contains an area for caching the undecorated name (which is 0-initialized). The decorated name has a bitfield followed by the linkage name. When std::type_info::name is invoked for the first time, the runtime should undecorate the name, cache it, and return the undecorated name. This requires access to an implementation of __unDName. For now, return the raw name. This uses the fnv-1a hash to hash the name of the RTTI. We could use an alternate hash (murmur? city?), but, this was the quickest to throw together. llvm-svn: 313344
* Fix accidental ADL in std::allocator_traits meta-programming.Eric Fiselier2017-09-159-6/+90
| | | | | | | | | | | There were a number of cases where __double_underscore functions, for example __has_construct_test, were called without being qualified, causing ADL to occur. This patch qualifies those calls to avoid this problem. Thanks to David L. Jones for point out the issue initially. llvm-svn: 313324
* [libc++] Prevent stale site configuration headersShoaib Meenai2017-09-141-1/+7
| | | | | | | | | | | If we define cmake macros that require a site config, and then undefine all such macros, a stale site config header will be left behind. Explicitly delete any generate site config if we don't need one to avoid this. Differential Revision: https://reviews.llvm.org/D36720 llvm-svn: 313284
* Use CMAKE_AR instead of the system default 'ar' for merging static librariesMartin Storsjo2017-09-132-3/+10
| | | | | | | | | | | | | | | Using the system default 'ar' might not be the right choice when cross compiling. Don't prepend the ar options by a dash, not all ar implementations support that (llvm-ar doesn't). Also pass the 's' option when creating the merged library, to create an index. Differential Revision: https://reviews.llvm.org/D37134 llvm-svn: 313122
* Mark the new tests as unsupported when there are no exceptionsMarshall Clow2017-09-122-2/+4
| | | | llvm-svn: 313092
* libcxx: fix merge_archives error variable nameMartell Malone2017-09-121-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D37728 llvm-svn: 313084
* Handle object files named *.obj in merge_archives.pyMartin Storsjo2017-09-121-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D37133 llvm-svn: 313072
* XFAIL a couple of new <regex> tests for C++03Marshall Clow2017-09-122-0/+2
| | | | llvm-svn: 313064
* Apply D28224: 'Throw exception after too many steps' Fixes PR#20291. Thanks ↵Marshall Clow2017-09-123-0/+112
| | | | | | to Tim Shen for the patch llvm-svn: 313056
* Make pbump (internally) handle sizes bigger than MAX_INT. Fixes PR#33725 - ↵Marshall Clow2017-09-126-14/+66
| | | | | | thanks to Jonathan Wakely for the report llvm-svn: 313031
* mark mersenne_twister_engine<>::seed(result_type __sd) with ↵Marshall Clow2017-09-111-0/+1
| | | | | | _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK to placate UBSAN. Fixes PR#34160 llvm-svn: 312932
* Add include of <string> to <system_error>, since things in there return ↵Marshall Clow2017-09-113-0/+22
| | | | | | strings. Fixes PR#34529. llvm-svn: 312923
* Fix PR34298 - Allow std::function with an incomplete return type.Eric Fiselier2017-09-103-26/+54
| | | | | | | | | | | | | This patch fixes llvm.org/PR34298. Previously libc++ incorrectly evaluated the __invokable trait via the converting constructor `function(Tp)` [with Tp = std::function] whenever the copy constructor or copy assignment operator was required. This patch further constrains that constructor to short circut before evaluating the troublesome SFINAE when `Tp` matches std::function. The original patch is from Alex Lorenz. llvm-svn: 312892
* Revert "Fix PR34298 - Allow std::function with an incomplete return type."Eric Fiselier2017-09-103-54/+26
| | | | | | | | | | | This reverts commit r312890 because the test case fails to compile for older versions of Clang that reject initializing a const object without a user defined constructor. Since this patch should go into 5.0.1, I want to keep it an atomic change, and will re-commit it with a fixed test case. llvm-svn: 312891
* Fix PR34298 - Allow std::function with an incomplete return type.Eric Fiselier2017-09-103-26/+54
| | | | | | | | | | | | | This patch fixes llvm.org/PR34298. Previously libc++ incorrectly evaluated the __invokable trait via the converting constructor `function(Tp)` [with Tp = std::function] whenever the copy constructor or copy assignment operator was required. This patch further constrains that constructor to short circut before evaluating the troublesome SFINAE when `Tp` matches std::function. The original patch is from Alex Lorenz. llvm-svn: 312890
* XFAIL tests on SLES11Brian Cain2017-09-084-2/+7
| | | | | | | XFAIL some failing tests for SLES11 (older glibc), also replace spaces in linux distro w/dashes. llvm-svn: 312774
* Add even more string_view tests. These found some bugs in the default ↵Marshall Clow2017-09-079-6/+1422
| | | | | | parameter value for rfind/find_last_of/find_last_not_of llvm-svn: 312693
* Another missing string_view testMarshall Clow2017-09-071-0/+74
| | | | llvm-svn: 312691
* Add more string_view testsMarshall Clow2017-09-073-0/+909
| | | | llvm-svn: 312690
* Redirect strftime_l to the locale-ignorant strftime on mingwMartin Storsjo2017-09-061-0/+4
| | | | | | | | | | | | | | | _strftime_l is only available in the numbered msvcrt versions (starting from msvcr80.dll). In the default configuration, mingw targets the unversioned msvcrt.dll - and there, _strftime_l is not available (not even on windows 10). If __MSVCRT_VERSION__ is set to a higher value (indicating a non-default target and wanting to link to msvcrXX.dll), use the correct function. Differential Revision: https://reviews.llvm.org/D37468 llvm-svn: 312617
* Add MINGW_LIBRARIES to the linker flagsMartin Storsjo2017-09-041-0/+1
| | | | | | | | | | This is essential when building with -nodefaultlibs. This is similar to what already is done in libcxxabi in SVN r302760. Differential revision: https://reviews.llvm.org/D37207 llvm-svn: 312498
* [libcxx] [www] Change an absolute link to cxx1z_status.html to be relative.Stephan T. Lavavej2017-08-311-1/+1
| | | | | | Fixes D37318. llvm-svn: 312263
* [libcxx] [www] Strip trailing whitespace.Stephan T. Lavavej2017-08-314-7/+7
| | | | | | Fixes D37318. llvm-svn: 312262
* [libcxx] [www] Fix broken link for LLVM Bugzilla.Stephan T. Lavavej2017-08-311-1/+1
| | | | | | Fixes D37318. llvm-svn: 312261
* [libcxx] [www] Manually change http links to https.Stephan T. Lavavej2017-08-3111-70/+70
| | | | | | Fixes D37318. llvm-svn: 312260
* [libcxx] [www] Semi-manually change http://www.open-std.org and ↵Stephan T. Lavavej2017-08-317-62/+62
| | | | | | | | http://isocpp.org papers to https://wg21.link . Fixes D37318. llvm-svn: 312259
* [libcxx] [www] Change http://cplusplus.github.io/LWG/lwg-defects.html# to ↵Stephan T. Lavavej2017-08-311-151/+151
| | | | | | | | https://wg21.link/lwg . Fixes D37318. llvm-svn: 312258
* [libcxx] [www] Change http://wg21.link to https://wg21.link .Stephan T. Lavavej2017-08-313-419/+419
| | | | | | Fixes D37318. llvm-svn: 312257
* [test] Cleanup nullopt_t testsCasey Carter2017-08-313-44/+14
| | | | | | | | | | | | | | * Update specification text from N4387 * Delete not_brace_initializable.fail.cpp: it's redundant with nullopt_t.fail.cpp * is_empty<T> implies is_class<T> * is_literal is deprecated; directly verify that we can create a nullopt_t in a constexpr context Differential Revision: D37024 llvm-svn: 312256
* Fix test for C++03Marshall Clow2017-08-291-3/+4
| | | | llvm-svn: 311967
* Fix PR31166: std::inplace_merge seems to be unstable. Thanks to Jan Wilken ↵Marshall Clow2017-08-282-5/+26
| | | | | | Dörrie for the suggested fix. llvm-svn: 311952
* [libcxx] [test] Update for C++17 feature removals.Stephan T. Lavavej2017-08-2416-21/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test/std/containers/Emplaceable.h test/std/containers/NotConstructible.h test/support/counting_predicates.hpp Replace unary_function/binary_function inheritance with typedefs. test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp test/std/utilities/function.objects/func.require/binary_function.pass.cpp test/std/utilities/function.objects/func.require/unary_function.pass.cpp Mark these tests as requiring 98/03/11/14 because 17 removed unary_function/binary_function. test/std/thread/futures/futures.task/futures.task.members/ctor_func_alloc.pass.cpp test/std/thread/futures/futures.task/futures.task.nonmembers/uses_allocator.pass.cpp Mark these tests as requiring 11/14 because 17 removed packaged_task allocator support. test/std/utilities/function.objects/func.wrap/func.wrap.func/derive_from.pass.cpp This test doesn't need to be skipped in C++17 mode. Only the construction of std::function from an allocator needs to be skipped in C++17 mode. test/std/utilities/function.objects/refwrap/refwrap.access/conversion.pass.cpp test/std/utilities/function.objects/refwrap/refwrap.assign/copy_assign.pass.cpp test/std/utilities/function.objects/refwrap/refwrap.const/copy_ctor.pass.cpp test/std/utilities/function.objects/refwrap/refwrap.const/type_ctor.pass.cpp When testing these reference_wrapper features, unary_function inheritance is totally irrelevant. test/std/utilities/function.objects/refwrap/weak_result.pass.cpp Define and use my_unary_function/my_binary_function to test the weak result type machinery (which is still present in C++17, although deprecated). test/support/msvc_stdlib_force_include.hpp Now we can test C++17 strictly, without enabling removed features. Fixes D36503. llvm-svn: 311705
* [NFC] remove trailing WSAditya Kumar2017-08-201-20/+20
| | | | llvm-svn: 311283
* SpellingJoerg Sonnenberger2017-08-181-2/+2
| | | | llvm-svn: 311156
* [libcxx] [test] Rename _Up to U, etc. NFCI.Stephan T. Lavavej2017-08-115-18/+18
| | | | | | | | | | This improves readability and (theoretically) improves portability, as _Ugly names are reserved. This performs additional de-uglification, so all of these tests follow the example of iterator.traits/empty.pass.cpp. llvm-svn: 310761
* [libcxx] [test] Rename __x to x. NFCI.Stephan T. Lavavej2017-08-114-25/+26
| | | | | | | This improves readability and (theoretically) improves portability, as __ugly names are reserved. llvm-svn: 310760
* [libcxx] [test] Rename __c to ch. NFCI.Stephan T. Lavavej2017-08-1137-148/+148
| | | | | | | This improves readability and (theoretically) improves portability, as __ugly names are reserved. llvm-svn: 310759
OpenPOWER on IntegriCloud