Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update external/libcxx from branch 'ndk-release-r19' to b5f21ba0d7ab42e67d67940b294fc9d602249871 - Merge changes from aosp/ndk. Change-Id: I200306530a2672950d91e8782012cfb4b58cbb2e - Fix upstream regression test regression. Will cherry-pick https://reviews.llvm.org/D53956 when it lands, but it's still waiting for review and we need to get beta 1 staged for QA. Test: ndk/checkbuild.py && ndk/run_tests.py Bug: https://github.com/android-ndk/ndk/issues/834 Change-Id: Ia4b1525e1b0b50eb335031ef4196031786301b2c - Update Android.mk to match upstream changes. Test: ndk/checkbuild.py && ndk/run_tests.py Bug: https://github.com/android-ndk/ndk/issues/834 Change-Id: I8830d428e1bb9e82974dfcf157fac0eba15d4f8e - Merge to upstream r345762. Test: ndk/checkbuild.py && ndk/run_tests.py Bug: https://github.com/android-ndk/ndk/issues/834 Change-Id: If652927d7d3bd52e9ce5f38eecdbc0236ba2069e - [NFC] Replace C++1y and C++1z by C++14 and C++17, respectively git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345762 91177308-0d34-0410-b5e6-96231b3b80d8 - [NFC] Mark "Splicing Maps and Sets" as done in LLVM 8.0 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345759 91177308-0d34-0410-b5e6-96231b3b80d8 - Second half of C++17's splicing maps and sets This commit adds a merge member function to all the map and set containers, which splices nodes from the source container. This completes support for P0083r3. Differential revision: https://reviews.llvm.org/D48896 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345744 91177308-0d34-0410-b5e6-96231b3b80d8 - Correct ABI list change wrongly advertised as being in the 7.0 release git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345670 91177308-0d34-0410-b5e6-96231b3b80d8 - Revert "Build with -fvisibility=hidden" I messed it up somewhere and now the tests aren't linking. Reverting while I investigate. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345667 91177308-0d34-0410-b5e6-96231b3b80d8 - Build with -fvisibility=hidden Summary: This change changes the build to use -fvisibility=hidden The exports this patch removes are symbols that should have never been exported by the dylib in the first place, and should all be symbols which the linker won't de-duplicate across SO boundaries, making them safe to remove. After this change, we should be able to apply `_LIBCPP_HIDDEN` to the versioning namespace without changing the export lists. Reviewers: ldionne, mclow.lists Reviewed By: ldionne Subscribers: smeenai, mgorny, libcxx-commits Differential Revision: https://reviews.llvm.org/D53868 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345664 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Correct link to code review for P1006 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345658 91177308-0d34-0410-b5e6-96231b3b80d8 - Make libc++'s versioning namespace customizable Summary: This patch makes the versioning namespace libc++ uses customizable by the user using `-DLIBCXX_ABI_NAMESPACE=__foo`. This allows users to build custom versions of libc++ which can be linked into binaries with other libc++ versions without causing symbol conflicts or ODR issues. Reviewers: mclow.lists, ldionne Reviewed By: ldionne Subscribers: kristina, smeenai, mgorny, phosek, libcxx-commits Differential Revision: https://reviews.llvm.org/D53879 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345657 91177308-0d34-0410-b5e6-96231b3b80d8 - Add link to implementation for P1006R0 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345653 91177308-0d34-0410-b5e6-96231b3b80d8 - Update LLVM version used on Appveyor bot, remove MSVC 2015 bot git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345652 91177308-0d34-0410-b5e6-96231b3b80d8 - Add more benchmarks for std::string. Summary: Added benchmarks for Construct, Copy, Move, Destroy, Relationals and Read. On the ones that matter, the benchmarks tests hot and cold data, and opaque and transparent inputs. Reviewers: EricWF Subscribers: christof, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D53825 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345611 91177308-0d34-0410-b5e6-96231b3b80d8 - Unify definition of _LIBCPP_BEGIN/END_NAMESPACE_STD git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345561 91177308-0d34-0410-b5e6-96231b3b80d8 - XFAIL test on OS X availability git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345529 91177308-0d34-0410-b5e6-96231b3b80d8 - Adapt to layout changes again. Test: ndk/checkbuild.py Bug: https://github.com/android-ndk/ndk/issues/780 Change-Id: I514caab36879fdcd3fda8b3740f3cf8efce90710 - Added Phab link for P0927 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345526 91177308-0d34-0410-b5e6-96231b3b80d8 - Bug 39129: Speeding up partition_point/lower_bound/upper_bound/ by using unsigned division by 2 when possible. Patch by Denis Yaroshevskiy ([email protected]) The rational and measurements can be found in the bug description: https://bugs.llvm.org/show_bug.cgi?id=39129 Reviewed as https://reviews.llvm.org/D52697 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345525 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix mismatch between size_t and uint64_t in std::set benchmark. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345523 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Use exclude_from_explicit_instantiation instead of always_inline Summary: This commit adopts the exclude_from_explicit_instantiation attribute discussed at [1] and reviewed in [2] in libc++ to supplant the use of __always_inline__ for visibility purposes. This change means that users wanting to link together translation units built with different versions of libc++'s headers into the same final linked image MUST define the _LIBCPP_HIDE_FROM_ABI_PER_TU macro to 1 when building those TUs. Doing otherwise will lead to ODR violations and ABI issues. [1]: http://lists.llvm.org/pipermail/cfe-dev/2018-August/059024.html [2]: https://reviews.llvm.org/D51789 Reviewers: rsmith, EricWF Subscribers: dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D52405 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345516 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix PR39458 _LIBCPP_DEBUG breaks heterogeneous compare. The types/comparators passed to std::upper_bound and std::lower_bound are not required to provided to provide an operator</comp(...) which accepts the arguments in reverse order. Nor are the ranges required to have a strict weak ordering. However, in debug mode we attempted to check the result of a comparison with the arguments reversed, which may not compiler. This patch removes the use of the debug comparator for upper_bound and lower_bound. equal_range et al still use debug comparators when they call __upper_bound and __lower_bound. See llvm.org/PR39458 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345434 91177308-0d34-0410-b5e6-96231b3b80d8 - Work around gcc.gnu.org/PR87766 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345425 91177308-0d34-0410-b5e6-96231b3b80d8 - [NFC] Update comment in libc++ ABI changelog git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345424 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix incorrect use of aligned allocation in get_temporary_buffer. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345403 91177308-0d34-0410-b5e6-96231b3b80d8 - XFAIL sized deallocation test with GCC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345400 91177308-0d34-0410-b5e6-96231b3b80d8 - Run the min/max tests agaist the header <charconv>. Fix that header so it passes. NFC. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345352 91177308-0d34-0410-b5e6-96231b3b80d8 - fix incorrect placement of _LIBCPP_ALWAYS_INLINE in valarray git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345289 91177308-0d34-0410-b5e6-96231b3b80d8 - Implement sized deallocation for std::allocator and friends. Summary: C++14 sized deallocation is disabled by default due to ABI concerns. However, when a user manually enables it then libc++ should take advantage of it since sized deallocation can provide a significant performance win depending on the underlying malloc implementation. (Note that libc++'s definitions of sized delete don't do anything special yet, but users are free to provide their own). This patch updates __libcpp_deallocate to selectively call sized operator delete when it's available. `__libcpp_deallocate_unsized` should be used when the size of the allocation is unknown. On Apple this patch makes no attempt to determine if the sized operator delete is unavailable, only that the language feature is enabled. This could cause a compile error when using `std::allocator`, but the same compile error would occur whenever the user calls `new`, so I don't think it's a problem. Reviewers: ldionne, mclow.lists Reviewed By: ldionne Subscribers: rsmith, ckennelly, libcxx-commits, christof Differential Revision: https://reviews.llvm.org/D53120 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345281 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Make sure we can build libc++ with -fvisibility=hidden Summary: When building with -fvisibility=hidden, some symbols do not get exported from libc++.dylib. This means that some entities are not explicitly given default visibility in the source code, and that we rely on the fact -fvisibility=default is the default. This commit explicitly gives default visibility to those symbols to avoid being dependent on the command line flags used. The commit also remove symbols from the dylib -- those symbols do not actually need to be exported from the dylib and this should not be an ABI break. Finally, in the future, we may want to mark the whole std:: namespace as having hidden visibility (to switch from opt-out to opt-in), in which case the changes done in this commit will be required. Reviewers: EricWF Subscribers: mgorny, christof, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D52662 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345260 91177308-0d34-0410-b5e6-96231b3b80d8 - Revert "Fix use of __libcpp_deallocate in dynarray" This reverts commit r345234 as it depended on the sized deallocation commit. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345240 91177308-0d34-0410-b5e6-96231b3b80d8 - Temporarily Revert "Implement sized deallocation for std::allocator and friends." This is breaking the bots here (and related): http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-asan/builds/1428 This reverts commit r345214. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345239 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix use of __libcpp_deallocate in dynarray git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345234 91177308-0d34-0410-b5e6-96231b3b80d8 - Implement sized deallocation for std::allocator and friends. Summary: C++14 sized deallocation is disabled by default due to ABI concerns. However, when a user manually enables it then libc++ should take advantage of it since sized deallocation can provide a significant performance win depending on the underlying malloc implementation. (Note that libc++'s definitions of sized delete don't do anything special yet, but users are free to provide their own). This patch updates __libcpp_deallocate to selectively call sized operator delete when it's available. `__libcpp_deallocate_unsized` should be used when the size of the allocation is unknown. On Apple this patch makes no attempt to determine if the sized operator delete is unavailable, only that the language feature is enabled. This could cause a compile error when using `std::allocator`, but the same compile error would occur whenever the user calls `new`, so I don't think it's a problem. Reviewers: ldionne, mclow.lists Reviewed By: ldionne Subscribers: rsmith, ckennelly, libcxx-commits, christof Differential Revision: https://reviews.llvm.org/D53120 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345214 91177308-0d34-0410-b5e6-96231b3b80d8 - Revert "Teach __libcpp_is_floating_point that __fp16 and _Float16 are" This reverts commits r333103 and r333108. _Float16 and __fp16 are C11 extensions and compilers other than Clang don't define these for C++. Differential Revision: https://reviews.llvm.org/D53670 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345199 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix use of libc++ specific macro in support/test_macros.h git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345173 91177308-0d34-0410-b5e6-96231b3b80d8 - Adjust unsupported C++ versions in some tests Summary: Some tests (mainly the new C++20 calendar library) fail when libc++ is tested with '--param=std=c++98'. The failures happen because the tests actually don't support C++98, but don't mention C++98 in the 'UNSUPPORTED:' line. This change fixes the issue. Reviewers: mclow.lists, ldionne Reviewed By: ldionne Subscribers: arphaman, michaelplatings, libcxx-commits Differential Revision: https://reviews.llvm.org/D53640 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345148 91177308-0d34-0410-b5e6-96231b3b80d8 - Off-by-one errors strike again. Thank goodness for ASAN and the bots. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345076 91177308-0d34-0410-b5e6-96231b3b80d8 - When filling a vector<bool> with stuff, initialize the last word of the storage that you're touching. Otherwise, when we lay down the bits with operator&=, we get UB from reading uninitialized memory. Fixes Bug 39354. Thanks to David Wagner for the bug report. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345067 91177308-0d34-0410-b5e6-96231b3b80d8 - Add benchmark for std::set. Summary: Benchmarks for construct, find, insert and iterate, with sequential and random ordered inputs. It also improves the cartesian product benchmark header to allow for runtime values to be specified in the product. Reviewers: EricWF Subscribers: christof, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D53523 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345035 91177308-0d34-0410-b5e6-96231b3b80d8 - Mark the move construct/move assign tests as unsupported on C++03 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@345001 91177308-0d34-0410-b5e6-96231b3b80d8 - Add tests for match_results copy/move assignment operators. NFC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344998 91177308-0d34-0410-b5e6-96231b3b80d8 - Remove a 'const' from the synopsis. NFC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344997 91177308-0d34-0410-b5e6-96231b3b80d8 - Updated the issue notes. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344989 91177308-0d34-0410-b5e6-96231b3b80d8 - Add tests for match_results copy/move construction. NFC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344988 91177308-0d34-0410-b5e6-96231b3b80d8 - Added more notes to the issues. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344975 91177308-0d34-0410-b5e6-96231b3b80d8 - Update commnents to reflect the changes for LWG#3127. NFC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344953 91177308-0d34-0410-b5e6-96231b3b80d8 - Update commnents to reflect the changes for LWG#3127. NFC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344951 91177308-0d34-0410-b5e6-96231b3b80d8 - Update commnents to reflect the changes for LWG#3122. NFC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344950 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] [test] Don't detect Windows' UCRT with TEST_COMPILER_C1XX The test is trying to avoid saying aligned_alloc on Windows' UCRT, which does not (and can not) implement aligned_alloc. However, it's testing for c1xx, meaning clang on Windows will fail this test when using the UCRT. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344829 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] [test] Add missing <stdexcept> to map at tests. Reviewed as https://reviews.llvm.org/D50551 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344821 91177308-0d34-0410-b5e6-96231b3b80d8 - Repair thread-unsafe modifications of n_alive in F.pass.cpp In this example, the ctor of G runs in the main thread in the expression G(), and also in the copy ctor of G() in the DECAY_COPY inside std::thread. The main thread destroys the G() instance at the semicolon, and the started thread destroys the G() after it returns. Thus there is a race between the threads on the n_alive variable. The fix is to join with the background thread before attempting to destroy the G in the main thread. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344820 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Improve reporting when running the lit test suite Summary: Running the test suite with -a will now properly show all the executed commands. The reports also include the environment under which the test is being executed, which is helpful for reproducing issues. Reviewers: EricWF Subscribers: christof, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D53215 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344700 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Mark chrono literal unit tests as being unsupported on AppleClang 10 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344661 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Avoid repeating the definition of std:: namespaces This reduces code duplication a tiny bit. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344642 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Remove _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY That macro has been defined to _LIBCPP_HIDE_FROM_ABI_AFTER_V1 for many weeks now, so we're actually replacing uses of it for uses of _LIBCPP_HIDE_FROM_ABI_AFTER_V1 directly. This should not change or break anything since the two macros are 100% equivalent, unless somebody is (incorrectly!) relying on _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY being defined. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344641 91177308-0d34-0410-b5e6-96231b3b80d8 - Recommit <chrono> changes with a couple xtra tests marked to fail on apple's clang. Reviewed as D51762 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344627 91177308-0d34-0410-b5e6-96231b3b80d8 - Partial fix for PR38964. (<string> can't be built with gcc -std=c++03) Reviewed as https://reviews.llvm.org/D52240 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344616 91177308-0d34-0410-b5e6-96231b3b80d8 - Re-apply r344546 "Mark a couple of test cases as 'C++17-only'..." Reverted too much in r344580. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344582 91177308-0d34-0410-b5e6-96231b3b80d8 - Revert r344529 "Implement the first part of the calendar support for C++20" Revert r344535 "Wrap up the new chrono literals in an #ifdef..." Revert r344546 "Mark a couple of test cases as 'C++17-only'..." Some of the buildbot failures were masked by another error, and this one was probably missed. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344580 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Remove custom CMake code targeting Mac OS 10.6 libc++ has dropped support for Mac OS 10.6 for a while, and we don't have any testers set up for that OS. This commit puts in an error message so that people can reach out to the libc++ maintainers in case support for 10.6 is still expected (as opposed to silently failing in weird ways). We can completely drop support for 10.6 and remove the error message some time in the future when we're sure that nobody is relying on it. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344576 91177308-0d34-0410-b5e6-96231b3b80d8 - Mark a couple of test cases as 'C++17-only' pending the resolution of PR#39232 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344546 91177308-0d34-0410-b5e6-96231b3b80d8 - Wrap up the new chrono literals in an #ifdef so that old versions of clang don't complain. I'm looking at you, clang 5.0.1 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344535 91177308-0d34-0410-b5e6-96231b3b80d8 - Implement the first part of the calendar support for C++20. This is still incomplete; there will be more patches coming. Reviewed as D51762 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344529 91177308-0d34-0410-b5e6-96231b3b80d8 - One more local type warning removed from the tests. NFC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344421 91177308-0d34-0410-b5e6-96231b3b80d8 - Update the array tests to not use a local type; removes warnings in C++03. NFC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344417 91177308-0d34-0410-b5e6-96231b3b80d8 - Update all the max_size tests to eliminate signed/unsigned comparison warnings. NFC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344416 91177308-0d34-0410-b5e6-96231b3b80d8 - Add benchmarks for std::function. Summary: Benchmarks for construct, copy, move, swap, destroy and invoke, with 8 different input states. For the cases that matter, it tests with and without allowing constant value propagation from construction into the operation tested. This also adds helper functions to generate the cartesian product of different configurations and generate benchmarks for all of them. Reviewers: EricWF Subscribers: christof, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D53087 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344415 91177308-0d34-0410-b5e6-96231b3b80d8 - [NFC][libc++] Fix broken link in comment git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344369 91177308-0d34-0410-b5e6-96231b3b80d8 - Revert commit r344254; does not work with C++03 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344261 91177308-0d34-0410-b5e6-96231b3b80d8 - Prefer to use the __is_XXX compiler intrinsics to the (old, busted) __has_XXX intrinsics when implementing type traits. Thanks to Richard Smith for the patch. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344254 91177308-0d34-0410-b5e6-96231b3b80d8 - Add a test that shows what happens with throwing destructors. NFC. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344220 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix use of removed _LIBCPP_HAS_NO_BUILTIN_ALIGNED_OPERATOR_NEW_DELETE It was replaced with the better named _LIBCPP_HAS_NO_BUILTIN_OVERLOADED_OPERATOR_NEW_DELETE. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344214 91177308-0d34-0410-b5e6-96231b3b80d8 - Distinguish between library and language support for aligned allocation. There are two cases: 1. The library has all it needs to provide align_val_t and the new/delete overloads needed to support aligned allocation. 2. The compiler has actually turned the language feature on. There are times where libc++ needs to distinguish between the two. This patch adds the additional macro _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION which denotes when case (1) does not hold. _LIBCPP_HAS_NO_ALIGNED_ALLOCATION is defined whenever _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION is defined, or when the compiler has not enabled the language feature. Additionally this patch cleans up a number of other macros related to detection of aligned allocation machinery. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344207 91177308-0d34-0410-b5e6-96231b3b80d8 - Use TEST_STD_VER instead of __cplusplus [NFC] While __cplusplus was only used a few dozen times, TEST_STD_VAR is used more than 2000 times. So we replace the former by the latter for consistency in the tests. There should be no functional change. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344194 91177308-0d34-0410-b5e6-96231b3b80d8 - Use std::scoped_lock only for C++17 and newer This fixes a test failure caused by D53049. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344192 91177308-0d34-0410-b5e6-96231b3b80d8 - Add test macros for always_inline and noinline git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344167 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix linking filesystem benchmarks git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344160 91177308-0d34-0410-b5e6-96231b3b80d8 - Annotate scoped_lock as with scoped_lockable attribute Summary: Scoped capabilities need to be annotated as such, otherwise the thread safety analysis won't work as intended. Fixes PR39234. Reviewers: ldionne Reviewed By: ldionne Subscribers: christof, libcxx-commits Differential Revision: https://reviews.llvm.org/D53049 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344096 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Mark std::async race condition test as unsupported on Darwin PR38682 added a test to check for a race condition in std::future. Part of the fix is part of the dylib, but there is no released version of mac OS X that ships a dylib containing the fix. Hence, this test can (and sometimes does) when testing on OS X. This commit marks the test as unsupported to avoid spurious failures. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344053 91177308-0d34-0410-b5e6-96231b3b80d8 - Do the math in uniform_int_distribution::operator() as unsigned to prevent UB when overflowing. Also add a UBSAN notification that we're ffine with unsigned overflow. This fixes PR#32617. Thanks to Vincent & Christoph for their help with this issue. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343996 91177308-0d34-0410-b5e6-96231b3b80d8 - Papers and Issues for San Diego git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343923 91177308-0d34-0410-b5e6-96231b3b80d8 - [CMake] Use just basename when copying C++ ABI headers This avoids duplicate directories when the filename includes path. Fixes PR39145 Differential Revision: https://reviews.llvm.org/D52762 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343753 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++][NFC] Add error messages to a couple of static_asserts in span Summary: Add error messages to a couple of static_asserts in span to match the style used in the rest of the file. Also fix an extra paren typo in a assert error message. Committed on behalf of Jason Lovett. Reviewers: ldionne Subscribers: libcxx-commits Differential Revision: https://reviews.llvm.org/D52841 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343725 91177308-0d34-0410-b5e6-96231b3b80d8 - Remove redundant null pointer check in operator delete Summary: C89 4.10.3.2 The free function C99 7.20.3.2 The free function C11 7.22.3.3 The free function If ptr is a null pointer, no action shall occur. _aligned_free on MSDN: If memblock is a NULL pointer, this function simply performs no actions. Reviewers: EricWF, mclow.lists, khng300, hotpxl Reviewed By: mclow.lists, khng300, hotpxl Subscribers: lichray, llvm-commits, hotpxl, khng300, christof, ldionne, cfe-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52401 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343503 91177308-0d34-0410-b5e6-96231b3b80d8 - Attempt to fix aligned allocation configuration under clang-cl When we're using clang-cl and Microsoft's runtime implementation, we don't provide align_val_t or aligned new/delete ourselves. This patch updates the _LIBCPP_HAS_NO_ALIGNED_ALLOCATION macro to reflect this. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343441 91177308-0d34-0410-b5e6-96231b3b80d8 - Remove one more warning from clang-cl build git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343440 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix Shadowing warning on Windows git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343439 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix even more Clang warnings. This patch disables shift-sign-overflow warnings for now. It also fixes most -Wfloat-equal warnings and -Wextra-semi warnings. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343438 91177308-0d34-0410-b5e6-96231b3b80d8 - Bump default dialect to C++14 for clang-cl git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343437 91177308-0d34-0410-b5e6-96231b3b80d8 - Remove even more clang-cl warnings git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343436 91177308-0d34-0410-b5e6-96231b3b80d8 - Mork more tests as FLAKY git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343435 91177308-0d34-0410-b5e6-96231b3b80d8 - Remove even more warnings from clang-cl build git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343434 91177308-0d34-0410-b5e6-96231b3b80d8 - Turn off warnings under clang-cl git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343433 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix threaded test under no-threading configuration git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343432 91177308-0d34-0410-b5e6-96231b3b80d8 - Attempt to unbreak Windows configuration. Although libc++ doesn't yet support Windows we still have Windows builders to track our progress. Currently the clang-cl configuration seems broken because it doesn't support -std=c++11 and instead requires /std:c++11. This patch attempts to fix this. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343431 91177308-0d34-0410-b5e6-96231b3b80d8 - [cxx2a] Fix warning triggered by r343285 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343369 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Remove Fuchsia-specific knowledge to pick the ABI version Summary: The ABI version used by libc++ is a configuration option just like any other configuration option. It is a knob that can be used by vendors to customize the libc++ that they ship. As such, we should not be hardcoding vendor-specific configuration choices in libc++. When building libc++ for Fuchsia, Fuchsia's build scripts should simply define the libc++ ABI version to 2 -- this will result in the _LIBCPP_ABI_VERSION macro being defined in the __config header that is generated when libc++ is built and installed, which is the correct way to customize libc++'s behavior for specific vendors. Reviewers: phosek, EricWF Subscribers: mgorny, christof, dexonsmith, cfe-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52397 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@343079 91177308-0d34-0410-b5e6-96231b3b80d8 - Revert r342936 "Remove redundant null pointer check in operator delete" A review for the change was opened in https://reviews.llvm.org/D52401 but the change was committed before being approved by any of the code owners for libc++. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342938 91177308-0d34-0410-b5e6-96231b3b80d8 - Remove redundant null pointer check in operator delete C89 4.10.3.2 The free function C99 7.20.3.2 The free function C11 7.22.3.3 The free function If ptr is a null pointer, no action shall occur. _aligned_free on MSDN: If memblock is a NULL pointer, this function simply performs no actions. Reviewers: EricWF, mclow.lists Subscribers: christof, ldionne, cfe-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52401 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342936 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Fix the binder deprecation tests on Clang 5. Tested on Docker containers with Clang 4, 5 and 6. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342855 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Fix buildbots on Debian Debian build bots are running Clang 4, which apparently does not support the "deprecated" attribute properly. Clang pretends to support the attribute, but the attribute doesn't do anything. (live example: https://wandbox.org/permlink/0De69aXns0t1D59r) On a separate note, I'm not sure I understand why we're even running the libc++ tests under Clang-4. Is this a configuration we support? I can understand that libc++ should _build_ with Clang 4, but it's not clear to me that new libc++ headers should be usable under older compilers like that. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342854 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Document new symbols __u64toa and __u32toa on Darwin Summary: This is the counterpart for https://reviews.llvm.org/D50130 and https://reviews.llvm.org/D52391 on Darwin. Reviewers: EricWF Subscribers: christof, dexonsmith, cfe-commits, libcxx-commits, lichray Differential Revision: https://reviews.llvm.org/D52396 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342849 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Add deprecated attributes to many deprecated components Summary: These deprecation warnings are opt-in: they are only enabled when the _LIBCXX_DEPRECATION_WARNINGS macro is defined, which is not the case by default. Note that this is a first step in the right direction, but I wasn't able to get an exhaustive list of all deprecated components per standard, so there's certainly stuff that's missing. The list of components this commit marks as deprecated is: in C++11: - auto_ptr, auto_ptr_ref - binder1st, binder2nd, bind1st(), bind2nd() - pointer_to_unary_function, pointer_to_binary_function, ptr_fun() - mem_fun_t, mem_fun1_t, const_mem_fun_t, const_mem_fun1_t, mem_fun() - mem_fun_ref_t, mem_fun1_ref_t, const_mem_fun_ref_t, const_mem_fun1_ref_t, mem_fun_ref() in C++14: - random_shuffle() in C++17: - unary_negate, binary_negate, not1(), not2() <rdar://problem/18168350> Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D48912 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342843 91177308-0d34-0410-b5e6-96231b3b80d8 - [NFC][libcxx] Rename helpers with 4 underscores to something more reasonable git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342840 91177308-0d34-0410-b5e6-96231b3b80d8 - [NFC][libc++] Fix typo in the description of LIBCXX_INCLUDE_BENCHMARKS git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342822 91177308-0d34-0410-b5e6-96231b3b80d8 - Mark [[nodiscard]] tests unsupported on GCC prior to 7.0 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342821 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix UB in SIMD tests. One of the SIMD tests attempted to left shift a value by 42, which is UB when the left hand side is a 32 bit integer type. This patch adjusts the test to use the value 4 instead of 42. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342820 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Readjust nodiscard_extensions.pass.cpp test - just disable for ASAN In rL342814, i have committed a blind fix to unbreak the asan buildbot, but as it was later discussed, the leak is intentional, so we can not fix the failure that way. So this reverts the leak 'fix', and simply disables the test in the presence of ASAN. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342819 91177308-0d34-0410-b5e6-96231b3b80d8 - Mark test as flaky git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342818 91177308-0d34-0410-b5e6-96231b3b80d8 - Correct docs to reference the new libc++ lists. We recently added libcxx-dev and libcxx-commits mailing lists. This patch updates the libc++ documentation to correctly reference the libc++ lists instead of the old Clang ones. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342816 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Blind attempt to fix harmless leak in nodiscard_extensions.pass.cpp test libcxx-libcxxabi-x86_64-linux-ubuntu-asan complains about a leak here. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342814 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Fix the definition of the check-cxx-abilist target on Darwin Summary: r342805 added support for the check-cxx-abilist target on FreeBSD, but broke the target on macOS in doing so. The problem is that the GENERIC_TARGET_TRIPLE gets overwritten after replacing the FreeBSD regular expression, which nullifies the replacement done with the darwin regular expression. Reviewers: dim, EricWF Subscribers: emaste, mgorny, krytarowski, christof, dexonsmith, cfe-commits, libcxx-commits Differential Revision: https://reviews.llvm.org/D52394 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342813 91177308-0d34-0410-b5e6-96231b3b80d8 - Document new symbols for __u64toa and __u32toa Summary: They are introduced in r338479; their Linux ABI changes are recorded in r338486. TODO: Record the Mac OS X ABI changes. Reviewers: EricWF Reviewed By: EricWF Subscribers: christof, ldionne, libcxx-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D52391 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342810 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Add _LIBCPP_ENABLE_NODISCARD and _LIBCPP_NODISCARD_EXT to allow pre-C++2a [[nodiscard]] Summary: The `[[nodiscard]]` attribute is intended to help users find bugs where function return values are ignored when they shouldn't be. After C++17 the C++ standard has started to declared such library functions as `[[nodiscard]]`. However, this application is limited and applies only to dialects after C++17. Users who want help diagnosing misuses of STL functions may desire a more liberal application of `[[nodiscard]]`. For this reason libc++ provides an extension that does just that! The extension must be enabled by defining `_LIBCPP_ENABLE_NODISCARD`. The extended applications of `[[nodiscard]]` takes two forms: 1. Backporting `[[nodiscard]]` to entities declared as such by the standard in newer dialects, but not in the present one. 2. Extended applications of `[[nodiscard]]`, at the libraries discretion, applied to entities never declared as such by the standard. Users may also opt-out of additional applications `[[nodiscard]]` using additional macros. Applications of the first form, which backport `[[nodiscard]]` from a newer dialect may be disabled using macros specific to the dialect it was added. For example `_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17`. Applications of the second form, which are pure extensions, may be disabled by defining `_LIBCPP_DISABLE_NODISCARD_EXT`. This patch was originally written by me (Roman Lebedev), then but then reworked by Eric Fiselier. Reviewers: mclow.lists, thakis, EricWF Reviewed By: thakis, EricWF Subscribers: llvm-commits, mclow.lists, lebedev.ri, EricWF, rjmccall, Quuxplusone, cfe-commits, christof Differential Revision: https://reviews.llvm.org/D45179 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342808 91177308-0d34-0410-b5e6-96231b3b80d8 - Similar to the handling of darwin target triples, strip the version numbers off of freebsd target triples, when generating the name of the ABI list file for check-cxx-abilist target. Also remove unnecessary parentheses in the regex for darwin, and slightly reword the comment. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342805 91177308-0d34-0410-b5e6-96231b3b80d8 - Remove a bunch of empty subdirectories. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342803 91177308-0d34-0410-b5e6-96231b3b80d8 - fix some typos in the doc git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342628 91177308-0d34-0410-b5e6-96231b3b80d8 - add a quick link to libc++abi git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342625 91177308-0d34-0410-b5e6-96231b3b80d8 - refresh the libc++ homepage git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342624 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix diagnostic regex in variant tests to tolerate older clang versions git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342609 91177308-0d34-0410-b5e6-96231b3b80d8 - Revert "Implement LWG 2221 - No formatted output operator for nullptr." This reverts r342566 as it causes on bots linker errors like > Undefined symbols for architecture i386: > "std::__1::basic_ostream<char, std::__1::char_traits<char> >::operator<<(std::nullptr_t)", referenced from: git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342599 91177308-0d34-0410-b5e6-96231b3b80d8 - Implement LWG 2221 - No formatted output operator for nullptr. Reviewed as https://reviews.llvm.org/D44263 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342566 91177308-0d34-0410-b5e6-96231b3b80d8 - Don't require relops on variant alternatives to all return the same type. Libc++ correctly asserts that a set of visitors for a variant all return the same type. However, we use the visitation machinary to perform relational operations. This causes a static assertion when some of the alternatives relops return a UDT which is implicitly convertible to bool instead of 'bool' exactly. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342560 91177308-0d34-0410-b5e6-96231b3b80d8 - Remove unused include of "verbose_assert.h" git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342524 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix typo git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342361 91177308-0d34-0410-b5e6-96231b3b80d8 - Mark LWG#3102 as complete. No code changes, but I updated a test or two git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342103 91177308-0d34-0410-b5e6-96231b3b80d8 - Implement the infrastructure for feature-test macros. Very few actual feature test macros, though. Reviewed as: https://reviews.llvm.org/D51955 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342073 91177308-0d34-0410-b5e6-96231b3b80d8 - Actually mark LWG#2953, don't just say you've done so in r342070 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342071 91177308-0d34-0410-b5e6-96231b3b80d8 - mark LWG#2953 as complete. No code changes required, but added a couple of extra tests. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342070 91177308-0d34-0410-b5e6-96231b3b80d8 - Update the failure annotations for the uncaught_exceptions test. The underlying abi library on some Mac OS versions does not support the plural uncaught_exceptions, so libc++ emulates it from the singlar; this means it will only return 0 or 1. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342063 91177308-0d34-0410-b5e6-96231b3b80d8 - Implement LWG #3017. list splice functions should use addressof git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@342057 91177308-0d34-0410-b5e6-96231b3b80d8 - Update the synopsis for <version>. NFC git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@341990 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix PR# 38900 - don't call swap inside of random_shuffle when we'd be swapping an element with itself git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@341975 91177308-0d34-0410-b5e6-96231b3b80d8 - ReleaseNotes: update links to use https git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@341789 91177308-0d34-0410-b5e6-96231b3b80d8 - [asan] Update a vector's storage annotation during destruction. Reviewed as https://reviews.llvm.org/D50101. Thanks to bobsayshilol (Ben) for the patch. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@341671 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Add a link to the Release notes from the main libc++ documentation git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@341551 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Add ReleaseNotes.rst file for release notes git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@341550 91177308-0d34-0410-b5e6-96231b3b80d8 - Last week, someone noted that a couple of the time_point member functions were not constexpr. I looked, and they were right. They were made constexpr in p0505, so I looked at all the other bits in that paper to make sure that I didn't miss anything else. There were a couple methods in the synopsis that should have been marked constexpr, but the code was correct. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340992 91177308-0d34-0410-b5e6-96231b3b80d8 - Use addressof instead of operator& in make_shared. Fixes PR38729. As a drive-by, make the same change in raw_storage_iterator (twice). git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340823 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix ODR violation: namespace-scope helpers should not be declared 'static'. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340778 91177308-0d34-0410-b5e6-96231b3b80d8 - Mark P0556 as 'in progress' git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340752 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Fix handling of negated character classes in regex Summary: This commit fixes a regression introduced in r316095, where we don't match inverted character classes when there's no negated characrers in the []'s. rdar://problem/43060054 Reviewers: mclow.lists, timshen, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50534 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340609 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Remove race condition in std::async Summary: The state associated to the future was set in one thread (with synchronization) but read in another thread without synchronization, which led to a data race. https://bugs.llvm.org/show_bug.cgi?id=38181 rdar://problem/42548261 Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D51170 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340608 91177308-0d34-0410-b5e6-96231b3b80d8 - Comment out #define __cpp_lib_node_extract, we only support half of that functionality Differential revision: https://reviews.llvm.org/D51172 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340544 91177308-0d34-0410-b5e6-96231b3b80d8 - Disable the aligned allocation test on old mac versions instead of XFAILing it It looks like this test XPASSes when the deployment target is older than the OS of the system the test is running on. It looks like we run the tests with -mmacosx-version-min=10.12, and that makes the test expect to fail, but it passes. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340427 91177308-0d34-0410-b5e6-96231b3b80d8 - Add diagnostics for min/max algorithms when a InputIterator is used. These algorithms require a ForwardIterator or better. Ensure we diagnose the contract violation at compile time instead of of silently doing the wrong thing. Further algorithms will be audited in upcoming patches. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340426 91177308-0d34-0410-b5e6-96231b3b80d8 - Attempt to unbreak filesystem tests on certain linux distros. On some platforms clock_gettime is in librt, which we don't link by default when building the tests. However it is required by the filesystem tests. This patch introduces a workaround which links librt whenever the filesystem tests are enabled. The workaround should later be replaced with a patch that selectively links both libc++fs and librt only when building filesystem specific tests. However, the way the test configuration is set up right now, this is non-trivial. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340406 91177308-0d34-0410-b5e6-96231b3b80d8 - Fix Bug 38644: multimap::clear() missing exception specifier. Add noexcept tests for all the containers that have clear(). git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340385 91177308-0d34-0410-b5e6-96231b3b80d8 - Teach libc++ to use native NetBSD's max_align_t Summary: The NetBSD headers ship with max_align_t, that is not compatible with the fallback version in libc++. There is no defined a compiler specific symbol in the headers like: - __CLANG_MAX_ALIGN_T_DEFINED - _GCC_MAX_ALIGN_T - __DEFINED_max_align_t Sponsored by <The NetBSD Foundation> Reviewers: chandlerc, dlj, EricWF, joerg Reviewed By: joerg Subscribers: bsdjhb, llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D47814 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340224 91177308-0d34-0410-b5e6-96231b3b80d8 - Refactor the newly created <bit> header. Still (almost) NFC. Reviewed as https://reviews.llvm.org/D50876 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340049 91177308-0d34-0410-b5e6-96231b3b80d8 - Recommit r339943 - Establish the <bit> header. NFC yet. Reviewed as https://reviews.llvm.org/D50815 - with a fix for the sanitizer bots git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@340045 91177308-0d34-0410-b5e6-96231b3b80d8 - Revert "Establish the <bit> header. NFC yet. Reviewed as https://reviews.llvm.org/D50815" Breaks build on sanitizer bots. This reverts commit r339943. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339971 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Use correct rand.eng.mers all-zeroes seed sequence fallback Summary: When a seed sequence would lead to having no non-zero significant bits in the initial state of a `mersenne_twister_engine`, the fallback is to flip the most significant bit of the first value that appears in the textual representation of the initial state. rand.eng.mers describes this as setting the value to be 2 to the power of one less than w; the previous value encoded in the implementation, namely one less than "2 to the power of w", is replaced by the correct value in this patch. Reviewers: mclow.lists, EricWF, jasonliu Reviewed By: mclow.lists Subscribers: mclow.lists, jasonliu, EricWF, christof, ldionne, cfe-commits Differential Revision: https://reviews.llvm.org/D50736 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339969 91177308-0d34-0410-b5e6-96231b3b80d8 - Establish the <bit> header. NFC yet. Reviewed as https://reviews.llvm.org/D50815 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339943 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] By default, do not use internal_linkage to hide symbols from the ABI Summary: https://reviews.llvm.org/D49240 led to symbol size problems in Chromium, and we expect this may be the case in other projects built in debug mode too. Instead, unless users explicitly ask for internal_linkage, we use always_inline like we used to. In the future, when we have a solution that allows us to drop always_inline without falling back on internal_linkage, we can replace always_inline by that. Note that this commit introduces a change in contract for existing libc++ users: by default, libc++ used to guarantee that TUs built with different versions of libc++ could be linked together. With the introduction of the _LIBCPP_HIDE_FROM_ABI_PER_TU macro, the default behavior is that TUs built with different libc++ versions are not guaranteed to link. This is a change in contract but not a change in behavior, since the current implementation still allows linking TUs built with different libc++ versions together. Reviewers: EricWF, mclow.lists, dexonsmith, hans, rnk Subscribers: christof, cfe-commits Differential Revision: https://reviews.llvm.org/D50652 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339874 91177308-0d34-0410-b5e6-96231b3b80d8 - Selectively import timespec_get into namespace std, since some C libraries don't have it. Reviewed as https://reviews.llvm.org/D50799 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339816 91177308-0d34-0410-b5e6-96231b3b80d8 - Mark the at_exit and at_quick_exit tests as unsupported under C++98 an 03, since those calls were introduced in C++11. They're already guarded by an ifdef in the code, so this is a 'belt-and-suspenders' change. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339804 91177308-0d34-0410-b5e6-96231b3b80d8 - libcxx: Mark __temp_value::__temp_value as _LIBCPP_NO_CFI. This constructor needs to cast a pointer to uninitialized memory to a pointer to object type in order to call allocator_traits::construct(). This cast is not allowed when CFI cast checks are enabled. I did this instead of marking __addr() as _LIBCPP_NO_CFI so that we don't lose CFI checks on get() or the dtor. Differential Revision: https://reviews.llvm.org/D50743 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339797 91177308-0d34-0410-b5e6-96231b3b80d8 - For FreeBSD, don't define _M in nasty_macros.hpp Because FreeBSD uses _M in its <sys/types.h>, and it is hard to avoid including that header, only define _M to NASTY_MACRO for other operating systems. This fixes almost 2000 unexpected test failures. Discussed with Eric Fiselier. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339794 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Fix XFAILs for aligned allocation tests on older OSX versions Summary: Since r338934, Clang emits an error when aligned allocation functions are used in conjunction with a system libc++ dylib that does not support those functions. This causes some tests to fail when testing against older libc++ dylibs. This commit marks those tests as UNSUPPORTED, and also documents the various reasons for the tests being unsupported. Reviewers: vsapsai, EricWF Subscribers: christof, dexonsmith, cfe-commits, mclow.lists, EricWF Differential Revision: https://reviews.llvm.org/D50341 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339743 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Disable failing C11 feature tests for <cfloat> and <float.h> Summary: Those tests are breaking the test bots. A Bugzilla has been filed to make sure those tests are re-enabled: https://bugs.llvm.org/show_bug.cgi?id=38572 Reviewers: mclow.lists, EricWF Subscribers: krytarowski, christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50748 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339742 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Detect C11 features on non-Clang compilers Summary: The macros were inside `#if defined(_LIBCPP_COMPILER_CLANG)`, which means we would never detect C11 features on non-Clang compilers. According to Marshall Clow, this is not the intended behavior. Reviewers: mclow.lists, EricWF Subscribers: krytarowski, christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50748 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339741 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Fix incorrect definition of TEST_HAS_C11_FEATURES Summary: The macro was not defined in C++11 mode when it should have been, at least according to how _LIBCPP_HAS_C11_FEATURES is defined. Reviewers: mclow.lists, EricWF, jfb, dexonsmith Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50719 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339702 91177308-0d34-0410-b5e6-96231b3b80d8 - [CMake] Fix the LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY option This option should be available if LIBCXX_ENABLE_SHARED is enabled, not LIBCXX_ENABLE_STATIC. This fixes a typo from SVN r337814. Differential Revision: https://reviews.llvm.org/D50691 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339697 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Add missing #include in C11 features tests Summary: These #includes are quite important, since otherwise any #if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) checks are always false, and so we don't actually test for C11 support in the standard library. Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50674 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339675 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] Mark charconv tests as failing for previous libcxx versions. <charconv> was added in r338479. Previous libcxx versions don't have this functionality and corresponding tests should be failing. Reviewers: mclow.lists, ldionne, EricWF Reviewed By: ldionne Subscribers: christof, dexonsmith, lichray, EricWF, cfe-commits Differential Revision: https://reviews.llvm.org/D50543 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339451 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Enable aligned allocation based on feature test macro, irrespective of standard Summary: The current code enables aligned allocation functions when compiling in C++17 and later. This is a problem because aligned allocation functions might not be supported on the target platform, which leads to an error at link time. Since r338934, Clang knows not to define __cpp_aligned_new when it's not available on the target platform -- this commit takes advantage of that to only use aligned allocation functions when they are available. Reviewers: vsapsai, EricWF Subscribers: christof, dexonsmith, cfe-commits, EricWF, mclow.lists Differential Revision: https://reviews.llvm.org/D50344 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339431 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] [test] Avoid -Wunused-local-typedef in node_handle.pass.cpp. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339218 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] [test] Allow a standard library that implements LWG 1203 in istream.rvalue/rvalue.pass.cpp (Still pending review at https://reviews.llvm.org/D47400 which has been open since may; will ask for forgiveness rather than permission :) ) git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339214 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] [test] Remove nonportable locale assumption in basic.ios.members/narrow.pass.cpp I'm not sure if libcxx is asserting UTF-8 here; but on Windows the full char value is always passed through in its entirety, since the default codepage is something like Windows-1252. The replacement character is only used for non-chars there; and that should be a more portable test everywhere. (Still pending review at https://reviews.llvm.org/D47395 which has been open since may; will ask for forgiveness rather than permission :) ) git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339213 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] [test] Remove asserts that <cstddef> and <stdexcept> are included by <bitset> Reviewed as https://reviews.llvm.org/D50421 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339212 91177308-0d34-0410-b5e6-96231b3b80d8 - [libcxx] [test] Add missing <stdexcept> in several tests. Reviewed as https://reviews.llvm.org/D50420 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@339209 91177308-0d34-0410-b5e6-96231b3b80d8 - [libc++] Add the _LIBCPP_HIDE_FROM_ABI_AFTER_V1 macro Summary: This macro allows hiding symbols from the ABI when the library is built with an ABI version after ABI v1, which is currently the only stable ABI. This commit defines `_LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY` to be `_LIBCPP_HIDE_FROM_ABI_AFTER_V1`, meaning that symbols that were only exported by the library for historical reasons are not exported anymore in the unstable ABI. Because of that, this commit is an ABI break for ABI v2. This ABI version is not stable, however, so this should n…
- Loading branch information