Commit Graph

4099 Commits

Author SHA1 Message Date
Marshall Clow
76c1482e7c Mark *fail tests as UNUSUPPORTED instead of XFAIL on old compilers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298832 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-27 06:31:58 +00:00
Shoaib Meenai
68fdad67e3 [libc++] Fix some comment typos
Remove a stray letter, add a missing letter. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298766 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-25 03:42:20 +00:00
Shoaib Meenai
f23e281656 [libc++] Fix word transposition in comment
"to due" -> "due to". No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298764 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-25 03:29:51 +00:00
Shoaib Meenai
e577401c13 [libc++] Fix capitalization in comment
Fix a stray capital letter in the middle of a sentence. No functional
change.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298763 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-25 03:22:35 +00:00
Shoaib Meenai
5b0087fc62 [libc++] Update package version
Make it consistent with the rest of LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298762 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-25 03:12:37 +00:00
Marshall Clow
5048b1e092 XFAIL the std::byte tests on a bunch of old clang versions, because they don't like 'std::byte b1{1}'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298706 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24 16:17:20 +00:00
Marshall Clow
21ae16e203 Implement P0298R3: 'std::byte'. Reviewed as https://reviews.llvm.org/D31022
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298689 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24 05:45:39 +00:00
Marshall Clow
0c70c79106 Move the scoped_lock inside the '#ifndef NO_THREADS' block to fix the no-threading build
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298686 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24 05:19:15 +00:00
Marshall Clow
59bcc879ab Implement Pp0156r2: 'Variadic Lock Guard, version 5' Reviewed as https://reviews.llvm.org/D31163.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298681 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24 03:40:36 +00:00
Marshall Clow
50e32f569c Update the algorithm tests to not use the (deprecated) function binders. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298618 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 16:13:50 +00:00
Bruce Mitchener
50145cc3e9 [libcxx] Improve code generation for vector::clear().
Summary:
By manipulating a local variable in the loop, when the loop can
be optimized away (due to no non-trivial destructors), this lets
it be fully optimized away and we modify the __end_ separately.

This results in a substantial improvement in the generated code.

Prior to this change, this would be generated (on x86_64):

    movq    (%rdi), %rdx
    movq    8(%rdi), %rcx
    cmpq    %rdx, %rcx
    je    LBB2_2
    leaq    -12(%rcx), %rax
    subq    %rdx, %rax
    movabsq    $-6148914691236517205, %rdx ## imm = 0xAAAAAAAAAAAAAAAB
    mulq    %rdx
    shrq    $3, %rdx
    notq    %rdx
    leaq    (%rdx,%rdx,2), %rax
    leaq    (%rcx,%rax,4), %rax
    movq    %rax, 8(%rdi)

And after:

    movq    (%rdi), %rax
    movq    %rax, 8(%rdi)

This brings this in line with what other implementations do.

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D25241

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298601 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 14:39:23 +00:00
Marshall Clow
699c414d73 Use 'REQUIRES: c++98 || c++03 || c++11 || c++14' instead of the deprecated 'REQUIRES-ANY: c++98, c++03, c++11, c++14'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298600 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 14:20:43 +00:00
Marshall Clow
a901b56e77 One more file for the random_shuffle removal
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298598 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 13:44:06 +00:00
Marshall Clow
03b862f6ea Remove random_shuffle in C++17. Please use shuffle instead. If you have to, you cant get it back by defining _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE before including any libc++ headers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298597 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 13:43:37 +00:00
Marshall Clow
46da6b8295 Silence a couple of 'unused variable' warnings in c++03 tests. No functional change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298582 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 06:25:26 +00:00
Michael Park
ad3680b23e Worked around GCC bug 56480. Explicit specialization in a different namespace.
Summary: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480

Reviewers: EricWF

Reviewed By: EricWF

Differential Revision: https://reviews.llvm.org/D31273

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298581 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 06:21:24 +00:00
Marshall Clow
570f32c8dd Can't test for noexcept on C++03; std::hash<nullptr_t> isn't available until C++17
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298580 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 06:20:18 +00:00
Marshall Clow
af552ba05a Implement P0599: 'noexcept for hash functions'. Fix a couple of hash functions (optional<T> and unique_ptr<T>) which were mistakenly marked as 'noexcept'. Reviewed as https://reviews.llvm.org/D31234
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298573 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 02:40:28 +00:00
Eric Fiselier
03096267d6 Address post-commit review comments regarding test_workarounds.h
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298566 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23 00:48:59 +00:00
Eric Fiselier
0da4cb892b [libc++] Work around C1XX bug which breaks poisoned hash tests.
Summary: This is my attempt to work around the C1XX bug described to me by @BillyONeal.

Reviewers: BillyONeal, STL_MSFT, CaseyCarter

Reviewed By: BillyONeal

Subscribers: cfe-commits, BillyONeal

Differential Revision: https://reviews.llvm.org/D31260

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298554 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-22 22:41:41 +00:00
Marshall Clow
faf14a571a Fix test failure I introduced
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298438 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21 21:05:28 +00:00
Marshall Clow
6b6874c8e2 Fix a couple of 'C++11'-isms from the last checkin, which broke the '03 bot.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298422 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21 19:12:21 +00:00
Marshall Clow
6ccca38d07 Add a bit more to one of the chrono tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298418 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21 18:40:46 +00:00
Marshall Clow
cf6e0db0b9 Implement P0548: 'common_type and duration' This involves a subtle change in the return type of the unary +/- operators for std::chrono::duration, though I expect that no one will notice.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298416 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21 18:38:57 +00:00
Marshall Clow
0b1f95bb0d Add two more papers from Kona, and sort them
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@298284 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-20 18:18:09 +00:00
Marshall Clow
2d4c3fa48a Implement LWG#2761: 'basic_string should require that charT match traits::char_type'. Tests for string_view, too
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297872 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-15 18:41:11 +00:00
Mehdi Amini
e807cbcd5b Add deployment knobs to tests (for Apple platforms)
The tests for libc++ specify -target on the command-line to the
compiler, but this is problematic for a few reasons.

Firstly, the -target option isn't supported on Apple platforms. Parts
of the triple get dropped and ignored. Instead, software should be
compiled with a combination of the -arch and -m<name>-version-min
options.

Secondly, the generic "darwin" target references a kernel version
instead of a platform version. Each platform has its own independent
versions (with different versions of libc++.1.dylib), independent of the
version of the Darwin kernel.

This commit adds support to the LIT infrastructure for testing against
Apple platforms using -arch and -platform options.

If the host is not on OS X, or the compiler type is not clang or apple-clang, then this commit has NFC.
If the host is on OS X and --param=target_triple=... is specified, then a warning is emitted to use arch and platform instead. Besides the warning, there's NFC.
If the host is on OS X and *no* target-triple is specified, then use the new deployment target logic. This uses two new lit parameters, --param=arch=<arch> and --param=platform=<platform>. <platform> has the form <name>[<version>].
By default, arch is auto-detected from clang -dumpmachine, and platform is "macosx".
If the platform doesn't have a version:
For "macosx", the version is auto-detected from the host system using sw_vers. This may give a different version than the SDK, since new SDKs can be installed on older hosts.
Otherwise, the version is auto-detected from the SDK version using xcrun --show-sdk-path.
-arch <arch> -m<name>-version-min=<version> is added to the compiler flags.
The target triple is computed as <arch>-apple-<platform>. It is *not* passed to clang, but it is available for XFAIL and UNSUPPORTED (as is with_system_cxx_lib=<target>).
For convenience, apple-darwin and <arch>-apple-darwin are added to the set of available features.
There were a number of tests marked to XFAIL on x86_64-apple-darwin11
and x86_64-apple-darwin12. I updated these to
x86_64-apple-macosx10.7 and x86_64-apple-macosx10.8.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297798 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-15 00:59:54 +00:00
Billy Robert O'Neal III
0b23f9c81d Fixed unintentional assignment-in-assert in new "extending memory management tools" algorithms.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297772 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 19:36:30 +00:00
Marshall Clow
7a16fa8ae2 Mark LWG issues 2868, 2872, and 2890 as complete. There's nothing we need to do for them.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297758 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 17:35:56 +00:00
Marshall Clow
755dd5959c Also mark LWG#2785 as complete, because we already implemented that
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297753 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 17:24:29 +00:00
Marshall Clow
abba685fcd Implement LWG2784, and mark 2786, 2795, 2804, 2812, 2826, 2834, 2837 and 2838 as complete - since we do them already
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297752 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 17:08:47 +00:00
Bruno Cardoso Lopes
dd1f05915f Fix cmake to find the compiler-rt libs on darwin
Followup for r297553, which left darwin in a broken state
http://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan_build/3812

rdar://problem/31011980

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297703 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-14 04:12:29 +00:00
Eric Fiselier
5cdf67386f fix test coverage capture dirs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297555 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 05:28:09 +00:00
Eric Fiselier
c51e0d21a1 Change test coverage generation to use llvm-cov instead of gcov.
Clang doesn't produce gcov compatible coverage files. This
causes lcov to break because it uses gcov by default. This
patch switches lcov to use llvm-cov as the gcov-tool.

Unfortunatly llvm-cov doesn't provide a gcov like interface by
default so it won't work with lcov. However `llvm-cov gcov` does.
For this reason we generate 'llvm-cov-wrapper' script that always
passes the gcov flag.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297553 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 03:24:18 +00:00
Eric Fiselier
76880f55bf Fix DoNotOptimize on MSVC
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297532 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-11 00:07:08 +00:00
Eric Fiselier
3b7c1348ca Disable unsigned integer sanitizer for basic_string::replace(). Patch from tomcherry@google.com
basic_string::replace() has the below line

__sz += __n2 - __n1;

which fails overflow checks if __n1 > __n2, as the negative result
from the subtraction then overflows the original __sz when added to
it.

This behavior is valid as unsigned integer overflow is defined to wrap
around the maximum value and that produces the correct final value for
__sz.  Therefore, we disable this check on this function.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297355 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-09 01:54:13 +00:00
Shoaib Meenai
15da97cb66 [libc++] Avoid double defining macro on Windows
Put proper guards around _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS.
No functional change on non-Windows. Avoids incorrect macro redefinition
on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297330 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-09 00:18:00 +00:00
Eric Fiselier
f1dab6865e Fix PR32183 - Wrap GCC exception implementation in missing namespace std
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297306 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-08 20:06:01 +00:00
Eric Fiselier
6f8ab3ed89 Add list of filesystem NB comments to TODO.TXT so they can be tracked separately
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297079 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-06 21:23:36 +00:00
Eric Fiselier
f158316563 Mark LWG 2806 as complete. Libc++ speculatively shiped this change in 4.0
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297074 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-06 21:09:02 +00:00
Eric Fiselier
27d4f668b3 Mark LWG 2789 as complete. No changes required
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297073 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-06 21:07:18 +00:00
Eric Fiselier
7c7df6461c Implement LWG 2787 - [file_status.cons] is inconsistent
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297071 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-06 21:02:06 +00:00
Eric Fiselier
b537d38bb2 Mark LWG 2781 as complete. No changes required
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297069 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-06 20:56:13 +00:00
Eric Fiselier
76a3c66153 Mark two any_cast issues as complete
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297066 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-06 20:49:42 +00:00
Michael Park
5a99cf1939 Updated email address in CREDITS.txt.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297065 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-06 20:46:55 +00:00
Marshall Clow
cd6055e526 Header update with info about the current status of C++17
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297022 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-06 16:09:02 +00:00
Marshall Clow
e116393a06 Update list with changes from Kona meeting
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@297021 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-06 16:06:02 +00:00
Eric Fiselier
45a6abf0fd Fix nonsense comment
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296965 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04 12:28:12 +00:00
Eric Fiselier
b75f6de984 teach LIT how to detect the glibc version
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296942 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-04 01:29:51 +00:00
Eric Fiselier
a075831614 Remove the buildit and testit scripts; they haven't been supported in years
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296922 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-03 22:47:45 +00:00