summaryrefslogtreecommitdiffstats
path: root/libcxx
Commit message (Collapse)AuthorAgeFilesLines
...
* [libc++] Fix std::abs testsZoe Carver2019-08-201-7/+14
| | | | | | | | | | On systems where sizeof(long) == sizeof(int) the current tests failed. This commit updates those tests to work on all systems. std::abs has specific long specializations which can be used instead. llvm-svn: 369437
* [libc++] Avoid implicit conversion warning in a <random> testLouis Dionne2019-08-201-23/+16
| | | | | | | | | | By stashing the computation of `E::max() - E::min()` in a variable, we avoid the warning introduced in r367497. Note that we use `auto` to avoid having to deduce the type of the computation, which is not a problem since Clang provides `auto` as an extension even in C++03 (and we disable warnings related to using C++11 extensions in the test suite). llvm-svn: 369429
* fix buildbot start script to no longer hangEric Fiselier2019-08-201-1/+1
| | | | llvm-svn: 369428
* [libc++] Implement LWG 3199Louis Dionne2019-08-203-3/+14
| | | | | | | | | | | | | | | | Summary: The resolution of LWG 3199 makes sure that input-streaming into an empty bitset does not set the failbit on the input stream. Reviewers: mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D65105 llvm-svn: 369422
* [libc++] Precise XFAIL for AppleClang 11Louis Dionne2019-08-201-1/+1
| | | | | | This test doesn't fail on all patch levels of AppleClang 11 llvm-svn: 369420
* bump lld version used by buildbotsEric Fiselier2019-08-201-2/+2
| | | | llvm-svn: 369416
* [libc++] fix test for unsigned charZoe Carver2019-08-201-1/+7
| | | | | | | | | On some systems char is unsigned. If that is the case, we will now test signed char twice in std::abs. NFC. Fixes the build bots. llvm-svn: 369413
* [libc++] Disable <chrono> ""d and ""y literal tests on AppleClang 10.0.0Louis Dionne2019-08-202-0/+2
| | | | | | | | In r368882, I enabled those tests for all AppleClang's above version 9. However, it turns out that the feature is only supported starting with AppleClang 10.0.1, not AppleClang 10.0.0. This commit fixes that hole. llvm-svn: 369409
* [libc++] Populate a lit feature including the compiler patch levelLouis Dionne2019-08-201-1/+3
| | | | | | | | | | | | | | If the compiler is (for example) AppleClang 10.0.1, we would previously populate the following lit features: apple-clang apple-clang-10 apple-clang-10.0 This patch additionally populates a feature called 'apple-clang-10.0.1', which allows more precise enabling/disabling of tests. llvm-svn: 369406
* Fix availability of __thread_id on builds with external threading. Reviewed ↵Marshall Clow2019-08-201-8/+11
| | | | | | as https://reviews.llvm.org/D66480 llvm-svn: 369399
* [libc++] std::abs should not return doubleZoe Carver2019-08-203-1/+98
| | | | | | | | Implement LWG Issue 2735 by adding std::abs tests for several types and checking their return value. NFC. llvm-svn: 369394
* [libc++] Explicitly cast in generate_canonicalLouis Dionne2019-08-201-1/+1
| | | | | | | | | | A new clang warning introduced in r367497 was complaining about the change in value. Thanks to Brian Cain for the patch. Differential Revision: https://reviews.llvm.org/D66422 llvm-svn: 369393
* [libcxx] Fix build breakage on mipsMikhail Maltsev2019-08-201-1/+1
| | | | | | | | | Fixes https://bugs.llvm.org/show_bug.cgi?id=43011 caused by https://reviews.llvm.org/D63284. Committing as obvious. llvm-svn: 369364
* Provide a meaningful diagnostic when LLVM_PATH doesn't point to a directoryLouis Dionne2019-08-191-0/+3
| | | | llvm-svn: 369312
* [libc++] Add XFAIL for is_base_of test on AppleClang 11Louis Dionne2019-08-191-2/+2
| | | | llvm-svn: 369280
* [libc++] reverts commit a5f5aad568bb7a91ceee47641f3076ac339ef8c7.Zoe Carver2019-08-191-110/+260
| | | | | | | | | The commit being reverted caused segfaults when building with libc++ and GCC (and possibly other configurations). Differential Revision: https://reviews.llvm.org/D62868 llvm-svn: 369270
* Fix thread comparison by making sure we never pass our special 'not a ↵Marshall Clow2019-08-142-4/+12
| | | | | | thread' value to the underlying implementation. Fixes PR#42918. llvm-svn: 368916
* [libc++] Mark <chrono> test as unsupported on AppleClang 9Louis Dionne2019-08-141-0/+1
| | | | llvm-svn: 368914
* [libc++] Mark std::tuple CTAD test as failing on AppleClang 9Louis Dionne2019-08-141-0/+1
| | | | | | | | Like CTAD for std::unordered_set, AppleClang 9's support for CTAD is insufficient. I suspect the corresponding LLVM Clang is broken too, but we don't seem to have testers using that Clang. llvm-svn: 368911
* This commit removes std::shared_ptr::make_shared and ↵Zoe Carver2019-08-141-260/+110
| | | | | | std::shared_ptr::allocate_shared as they are not part of the standard. This commit also adds the helper function "__create_with_cntrl_block" which std::allocate_shared and std::make_shared have been updated to use. llvm-svn: 368885
* [libc++] Enable <chrono> ""d and ""y literals for AppleClang 10 and upLouis Dionne2019-08-143-5/+6
| | | | | | AppleClang supports those literals starting in version 10.0.1. llvm-svn: 368882
* [libc++] Do not define _LIBCPP_CLANG_VER for non-LLVM ClangLouis Dionne2019-08-141-6/+2
| | | | | | | | | | | | | In r292833, we started defining _LIBCPP_CLANG_VER to 0 for Apple Clang. The result is that AppleClang is detected as being a very old version of LLVM Clang (version 0), which is obviously incorrect. I believe this was added so that we don't have to check whether _LIBCPP_CLANG_VER is defined prior to comparing it with a number (which can trigger a warning). This commit also fixes the two places that use the macro correspondingly. llvm-svn: 368880
* Rework recursive_timed_mutex so that it uses __thread_id instead of using ↵Marshall Clow2019-08-144-78/+87
| | | | | | the lower-level __libcpp_thread_id. This is prep for fixing PR42918. Reviewed as https://reviews.llvm.org/D65895 llvm-svn: 368867
* [libc++] Mark two <chrono> tests as unsupported on AppleClang 11Louis Dionne2019-08-132-2/+2
| | | | | | | The operator""y and operator""d will eventually be supported by AppleClang, but no released version supports them at the moment. llvm-svn: 368749
* [libc++] Always build with -fvisibility=hiddenLouis Dionne2019-08-134-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This avoids symbols being accidentally exported from the dylib when they shouldn't. The next step is to use a pragma to apply hidden visibility to all declarations (unless otherwise specified), which will allow us to drop the per-declaration hidden visibility attributes we currently have. This also has the nice side effect of making sure the dylib exports the same symbols regardless of the optimization level. PR38138 Reviewers: EricWF, mclow.lists Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D62868 llvm-svn: 368703
* [libc++] Fix incorrect UNSUPPORTED annotationLouis Dionne2019-08-131-1/+1
| | | | | | | The test was marked as UNSUPPORTED for clang-6 and clang-6, instead of clang-6 and clang-7. llvm-svn: 368666
* [libc++] Use [[nodiscard]] for lock_guard, as an extensionLouis Dionne2019-08-134-3/+39
| | | | | | | | | | | | | | | | | | | Summary: D64914 added support for applying [[nodiscard]] to constructors. This commit uses that capability to flag incorrect uses of std::lock_guard where one forgets to actually create a variable for the lock_guard. rdar://45790820 Reviewers: mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits, Quuxplusone, lebedev.ri Tags: #libc Differential Revision: https://reviews.llvm.org/D65900 llvm-svn: 368664
* [libc++] Implement CTAD for std::tupleLouis Dionne2019-08-122-20/+78
| | | | | | | | | | | | | | | | | | | | | Summary: We were using implicit deduction guides instead of explicit ones, however the implicit ones don't do work anymore when changing the constructors. This commit adds the actual guides specified in the Standard to make libc++ (1) closer to the Standard and (2) more resistent to changes in std::tuple's constructors. Reviewers: Quuxplusone Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D65225 llvm-svn: 368599
* Improve codegen for deque.Eric Fiselier2019-08-125-28/+210
| | | | | | | | | | | | | | | | | | | | | | | This patch rewrites a few loops in deque and split_buffer to better optimize the codegen. For constructors like `deque<unsigned char> d(500000, 0);` this patch results in a 2x speedup. The patch improves the codegen in roughly three ways: 1. Changes do { ... } while (...) loops into more typical for loops. The optimizer can reason about normal looking loops better. 2. Split the iteration over a range into (A) iteration over the blocks, then (B) iteration within the block. This nested structure helps LLVM lower the inner loop to `memset`. 3. Do fewer things each iteration. Some of these loops were incrementing or changing 4-5 variables every loop (in addition to the construction). Previously most loops would increment the end pointer, the size, and decrement the count of remaining items to construct. Now we only increment a single pointer for most iterations. llvm-svn: 368547
* [libc++] Fix environment variable passing in libc++'s `SSHExecutor` `lit` ↵Louis Dionne2019-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | utility Summary: Quote the value of environment variables when passing them to the SSH client in SSHExecutor in libc++'s lit utilities. Without the quotes, an environment variable like FOO="buzz bar" gets passed incorrectly like this, ssh env FOO=buzz bar, which causes bar to be treated as a command to run, not part of the environment variable value. We ran into this when using SSHExecutor to do bringup of our CUDA libcu++ port on an embedded aarch64 system. Patch by Bryce Adelstein Lelbach. Differential Revision: https://reviews.llvm.org/D65960 llvm-svn: 368317
* Implement hh_mm_ss from P1466R3. Reviewed as https://reviews.llvm.org/D65365.Marshall Clow2019-08-0816-6/+896
| | | | llvm-svn: 368299
* [pstl] Add a __pstl_config_site header to record the CMake configurationLouis Dionne2019-08-082-5/+8
| | | | | | | | | | | | | This commit adds a __pstl_config_site header that contains the value of macros specified at CMake configuration time. It works similarly to libc++'s __config_site header, except we always include it as a separate file instead of concatenating it to the main configuration header. It is necessary to thread the includes for that header into libc++'s lit configuration, otherwise we'd be requiring an installation step prior to running the test suite. llvm-svn: 368284
* Revert "[libc++] Take 3: Do not cleverly link against libc++abi just because ↵Louis Dionne2019-08-082-1/+24
| | | | | | | | | | | it happens to be there" This also reverts "[libc++] Remove temporary hack for D63883". Clearly, I don't understand how the Linux build bots are configured. Differential Revision: https://reviews.llvm.org/D63883 llvm-svn: 368238
* [libc++] Remove temporary hack for D63883Louis Dionne2019-08-071-10/+0
| | | | | | | This should fix the build bots, who now specify explicitly that they're building against libc++abi. llvm-svn: 368216
* [libc++] Take 3: Do not cleverly link against libc++abi just because it ↵Louis Dionne2019-08-072-14/+1
| | | | | | | | | | | | | | | | | | | | | | | happens to be there Summary: Otherwise, when libcxxabi is not an enabled project in the monorepo, we get a link error because we try to link against non-existent cxxabi_shared. More generally, we shouldn't change the behavior of the build based on implicit things like whether a file happens to be at a specific path or not. This is a re-application of r365222 that had been reverted in r365233 and then r365359 because it broke the build bots. The build bots should now specify explicitly what ABI library they want to use (libc++abi), so this commit should now be OK to merge. It takes a while for build bots to pick up configuration changes, which is why this failed the last time around. Differential Revision: https://reviews.llvm.org/D63883 llvm-svn: 368213
* [pstl][libc++] Provide uglified header names for interface headersLouis Dionne2019-08-064-4/+4
| | | | | | | | | | | For the few (currently four) headers that make up the PSTL's interface to other Standard Libraries, provide a stable uglified header file that can be included by those Standard Libraries. We can then more easily change the internal organization of the PSTL without having to change the integration with Standard Libraries. llvm-svn: 368088
* [libc++] Use the monorepo for the back-deployment testing scriptsLouis Dionne2019-08-062-59/+27
| | | | llvm-svn: 368077
* [libc++] Use the monorepo in the macos-trunk CI scriptLouis Dionne2019-08-061-54/+17
| | | | llvm-svn: 368051
* [libc++] Accept any non-zero return for .fail.cpp testsLouis Dionne2019-08-051-2/+2
| | | | llvm-svn: 367930
* [libc++] Take 2: Integrate the PSTL into libc++Louis Dionne2019-08-0514-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when configuring libc++ in CMake. When that option is enabled, libc++ will assume that the PSTL can be found somewhere on the CMake module path, and it will provide the C++17 parallel algorithms based on the PSTL (that is assumed to be available). The commit also adds support for running the PSTL tests as part of the libc++ test suite. The first attempt to commit this failed because it exposed a bug in the tests for modules. Now that this has been fixed, it should be safe to commit this. Reviewers: EricWF Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF Tags: #libc Differential Revision: https://reviews.llvm.org/D60480 llvm-svn: 367903
* Revert "Suppress -Wctad-maybe-unsupported on types w/o deduction guides."Eric Fiselier2019-08-049-60/+1
| | | | | | | | | Some modules builds are issuing buggy diagnostics. The cause of which is TBD. This reverts commit r@367770. llvm-svn: 367777
* Suppress -Wctad-maybe-unsupported on types w/o deduction guides.Eric Fiselier2019-08-039-1/+60
| | | | | | | | | | | There are a handful of standard library types that are intended to support CTAD but don't need any explicit deduction guides to do so. This patch adds a dummy deduction guide to those types to suppress -Wctad-maybe-unsupported (which gets emitted in user code). llvm-svn: 367770
* Revert accidental change to __member_pointer_traits_imp.Eric Fiselier2019-08-031-1/+3
| | | | | | | A previous patch accidentally made the primary template an incomplete type. This broke some C++03 constructs. llvm-svn: 367762
* Simplify <type_traits> implementations.Eric Fiselier2019-08-031-67/+36
| | | | | | | | | | | | This patch rewrites a number of old meta-function implementations that assumed const/volatile could not be safely applied to all types. This is no longer the case, though for some types (Ex function types), the const qualifier can be ignored. The largest improvement in this patch is the reduction of is_function. Thanks to Matt Calabrese for the improved implementation. llvm-svn: 367749
* Add benchmarks to test the cost of allocatorEric Fiselier2019-08-022-0/+138
| | | | llvm-svn: 367722
* Refactor deque to centralize handling of spare blocks.Eric Fiselier2019-08-012-48/+334
| | | | | | | | I have upcoming changes that modify how deque handles spare blocks. This cleanup is intended to make those changes easier to review and understand. This patch should have NFC. llvm-svn: 367631
* Teach malloc_allocator how to count bytesEric Fiselier2019-08-011-3/+9
| | | | llvm-svn: 367606
* Change default bucket count in hash_set/hash_map.Eric Fiselier2019-08-016-42/+113
| | | | | | | | | | | Previously these types rehashed to a table of 193 elements upon construction. But this is non-ideal, first because default constructors should not allocate unless necessary, and second because 193 is big and can waste a bunch of memory. This number had previously been chosen to match GCC's implementation. llvm-svn: 367605
* [benchmark] Fix win32 link on case-sensitive fsRoman Lebedev2019-07-302-1/+5
| | | | | | | | | | | | | | Summary: This fixes cross-builds with MinGW from case-sensitive file-systems (on Linux) This is a cherry-pick from https://github.com/google/benchmark/pull/840 https://github.com/google/benchmark/commit/8e48105d465c586068dd8e248fe75a8971c6ba3a Original patch by: @jschueller (Julien Schueller) ! Differential Revision: https://reviews.llvm.org/D61371 llvm-svn: 367356
* add more information to benchmark test failuresEric Fiselier2019-07-301-1/+1
| | | | llvm-svn: 367319
OpenPOWER on IntegriCloud