| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
...which `test/support/test_macros.h` can use to detect compiler support.
llvm-svn: 374722
|
|
|
|
|
|
| |
`make_optional<string>(4, 'X')` passes `4` (an `int`) as the first argument to `string`'s `(size_t, charT)` constructor, triggering a signed/unsigned mismatch warning when compiling with MSVC at `/W4`. The incredibly simple fix is to instead use an unsigned literal (`4u`).
llvm-svn: 374684
|
|
|
|
|
|
|
|
|
|
| |
Handle the case when libc++abi and libunwind are being built together
with libc++ in the runtimes build. This logic was used in the previous
implementation but dropped in r374116.
Differential Revision: https://reviews.llvm.org/D68791
llvm-svn: 374510
|
|
|
|
|
|
|
|
|
|
| |
object buffer
`sizeof(std::any) - sizeof(void*)` is correct for both libc++ and the MSVC standard library.
Differential Revision: https://reviews.llvm.org/D68756
llvm-svn: 374407
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Silence unused-local-typedef warnings: `map.cons/assign_initializer_list.pass.cpp` (and the `set.cons` variant) uses a local typedef only within `LIBCPP_ASSERT`s, so clang diagnoses it as unused when testing non-libc++.
* Add missing include: `c.math/abs.pass.cpp` uses `std::numeric_limits` but failed to `#include <limits>`.
* Don't test non-type: A "recent" change to `meta.trans.other/underlying_type.pass.cpp` unconditionally tests the type `F` which is conditionally defined.
* Use `hash<long long>` instead of `hash<short>` with `int` in `unordered_meow` deduction guide tests to avoid truncation warnings.
* Convert `3.14` explicitly in `midpoint.float.pass` since MSVC incorrectly diagnoses `float meow = 3.14;` as truncating.
Differential Revision: https://reviews.llvm.org/D68681
llvm-svn: 374248
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch by Martijn Vels (mvels@google.com)
Reviewed as https://reviews.llvm.org/D68276
This is a non trivial win for externally templated assignment operator.
x86 without tail call (current libc++)
0000000000000000 <std::string::operator=(std::string const&)>:
0: 55 push %rbp
1: 48 89 e5 mov %rsp,%rbp
4: 53 push %rbx
5: 50 push %rax
6: 48 89 fb mov %rdi,%rbx
9: 48 39 f7 cmp %rsi,%rdi
c: 74 17 je 25 <std::string::operator=(std::string const&)+0x25>
e: 0f b6 56 17 movzbl 0x17(%rsi),%edx
12: 84 d2 test %dl,%dl
14: 79 07 jns 1d <std::string::operator=(std::string const&)+0x1d>
16: 48 8b 56 08 mov 0x8(%rsi),%rdx
1a: 48 8b 36 mov (%rsi),%rsi
1d: 48 89 df mov %rbx,%rdi
20: e8 00 00 00 00 callq 25 <std::string::operator=(std::string const&)+0x25>
25: 48 89 d8 mov %rbx,%rax
28: 48 83 c4 08 add $0x8,%rsp
2c: 5b pop %rbx
2d: 5d pop %rbp
2e: c3 retq
After:
0000000000000000 <std::string::operator=(std::string const&)>:
0: 48 39 f7 cmp %rsi,%rdi
3: 74 14 je 19 <std::string::operator=(std::string const&)+0x19>
5: 0f b6 56 17 movzbl 0x17(%rsi),%edx
9: 84 d2 test %dl,%dl
b: 79 07 jns 14 <std::string::operator=(std::string const&)+0x14>
d: 48 8b 56 08 mov 0x8(%rsi),%rdx
11: 48 8b 36 mov (%rsi),%rsi
14: e9 00 00 00 00 jmpq 19 <std::string::operator=(std::string const&)+0x19>
19: 48 89 f8 mov %rdi,%rax
1c: c3 retq
Benchmark (pending per https://reviews.llvm.org/D67667)
```
BM_StringAssignStr_Empty_Opaque 6.23ns ± 0% 5.19ns ± 0% -16.70% (p=0.016 n=5+4)
BM_StringAssignStr_Empty_Transparent 5.86ns ± 0% 5.14ns ± 0% -12.24% (p=0.008 n=5+5)
BM_StringAssignStr_Small_Opaque 8.79ns ± 1% 7.69ns ± 0% -12.53% (p=0.008 n=5+5)
BM_StringAssignStr_Small_Transparent 9.44ns ± 0% 8.00ns ± 0% -15.26% (p=0.008 n=5+5)
BM_StringAssignStr_Large_Opaque 25.2ns ± 0% 24.3ns ± 0% -3.50% (p=0.008 n=5+5)
BM_StringAssignStr_Large_Transparent 23.6ns ± 0% 22.5ns ± 0% -4.76% (p=0.008 n=5+5)
BM_StringAssignStr_Huge_Opaque 319ns ± 5% 317ns ± 5% ~ (p=0.690 n=5+5)
BM_StringAssignStr_Huge_Transparent 319ns ± 5% 317ns ± 5% ~ (p=0.421 n=5+5)
BM_StringAssignAsciiz_Empty_Opaque 7.41ns ± 0% 7.77ns ± 0% +4.89% (p=0.008 n=5+5)
BM_StringAssignAsciiz_Empty_Transparent 7.54ns ± 3% 7.30ns ± 0% -3.24% (p=0.008 n=5+5)
BM_StringAssignAsciiz_Small_Opaque 9.87ns ± 0% 10.24ns ± 1% +3.76% (p=0.008 n=5+5)
BM_StringAssignAsciiz_Small_Transparent 10.4ns ± 1% 9.8ns ± 2% -5.78% (p=0.008 n=5+5)
BM_StringAssignAsciiz_Large_Opaque 30.1ns ± 0% 30.1ns ± 0% ~ (p=0.167 n=5+5)
BM_StringAssignAsciiz_Large_Transparent 27.1ns ± 0% 27.4ns ± 0% +0.92% (p=0.016 n=4+5)
BM_StringAssignAsciiz_Huge_Opaque 383ns ± 4% 382ns ± 4% ~ (p=0.548 n=5+5)
BM_StringAssignAsciiz_Huge_Transparent 375ns ± 0% 380ns ± 0% +1.37% (p=0.029 n=4+4)
BM_StringAssignAsciizMix_Opaque 14.0ns ± 0% 14.0ns ± 0% ~ (p=0.881 n=5+5)
BM_StringAssignAsciizMix_Transparent 13.7ns ± 1% 13.8ns ± 0% ~ (p=0.056 n=5+5)
```
llvm-svn: 374137
|
|
|
|
| |
llvm-svn: 374120
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This allows the linker script generation to query CMake properties
(specifically the dependencies of libc++.so) instead of having to
carry these dependencies around manually in global variables. Notice
the removal of the LIBCXX_INTERFACE_LIBRARIES global variable.
Reviewers: phosek, EricWF
Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D68343
llvm-svn: 374116
|
|
|
|
|
|
|
|
|
| |
It turns out that r374056 broke _some_ build bots again, specifically
the ones using sanitizers. Instead of trying to link the right system
libraries to the benchmarks bit-by-bit, let's just link exactly the
system libraries that libc++ itself needs.
llvm-svn: 374079
|
|
|
|
|
|
|
|
|
|
| |
We tried doing that previously (in r373487) and failed (reverted in
r373506) because the benchmarks needed to link against system libraries
and relied on libc++'s dependencies being propagated. Now that this has
been fixed (in r374053), this commit marks the system libraries as
PRIVATE dependencies of libc++.
llvm-svn: 374056
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the benchmarks build with -nostdlib, they need to manually link
against some system libraries that are used by the benchmarks and the
GoogleBenchmark library itself.
Previously, we'd rely on the fact that these libraries were linked
through the PUBLIC dependencies of cxx_shared/cxx_static. However,
if we were to make these dependencies PRIVATE (as they should be
because they are implementation details of libc++), the benchmarks
would fail to link. This commit remediates that.
llvm-svn: 374053
|
|
|
|
|
|
|
|
| |
It's better style to use PRIVATE when linking libraries to executables,
and it doesn't make a difference since executables don't need to propagate
their link-time dependencies anyway.
llvm-svn: 374050
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: In my last patch (D67675) I forgot a few variadics. This patch removes the remaining make_shared and allocate_shared C++03 variadics.
Reviewers: ldionne, EricWF, mclow.lists
Subscribers: christof, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D68000
llvm-svn: 373971
|
|
|
|
|
|
|
|
|
|
| |
LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY
If you explicitly set LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY to OFF, your
project will fail to configure because the cxx_experimental target
doesn't exist.
llvm-svn: 373809
|
|
|
|
|
|
|
|
| |
Also, set those flags for the cxx_experimental target. Otherwise,
cxx_experimental doesn't build properly when neither the static nor
the shared library is compiled (yes, that is a weird setup).
llvm-svn: 373808
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The current version of the pretty printers are not python3 compatible,
so turn them off by default until sufficiently improved.
Reviewers: MaskRay, tamur
Subscribers: mgorny, christof, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68477
llvm-svn: 373796
|
|
|
|
|
|
|
| |
It appears that those need to be propagated to targets that use libc++
as well, otherwise they don't build properly.
llvm-svn: 373773
|
|
|
|
|
|
|
| |
This daily refactoring tackles flags related to modules,
exceptions and RTTI.
llvm-svn: 373767
|
|
|
|
| |
llvm-svn: 373691
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first commit removed the workaround in a old script.
This patch removes it in the file actually used by the bots.
I have no idea if this is still needed, but removing the
workaround seems like the easiest way to test.
I'll revert this change if the bots go red.
llvm-svn: 373653
|
|
|
|
|
|
|
|
|
| |
I have no idea if this is still needed, but removing the
workaround seems like the easiest way to test.
I'll revert this change if the bots go red.
llvm-svn: 373650
|
|
|
|
|
|
|
|
|
|
|
| |
This allows propagating the include automatically to targets that
depend on one of the libc++ targets such as the benchmarks. Note
that the GoogleBenchmark build itself still needs to manually specify
the -include, since I don't know of any way to have an external project
link against one of the libc++ targets (which would propagate the -include
automatically).
llvm-svn: 373631
|
|
|
|
| |
llvm-svn: 373625
|
|
|
|
|
|
|
|
| |
In both Python 2 and Python 3, gdb.Value.string returns a 'str'. We just
need to delete a `encode("utf-8")` which would return a 'bytes' in
Python 3.
llvm-svn: 373570
|
|
|
|
|
|
|
|
| |
This commit follows the trend of doing things per-target instead of
modifying the C++ flags globally. It does so for visibility-related
flags, other basic build flags and Windows-specific flags.
llvm-svn: 373517
|
|
|
|
|
|
|
|
|
|
| |
This is part of a larger shift to move to per-target settings and
eradicate global variables from the CMake build. I'm starting small
with warnings only because those are easy to transition over and I
want to see how it pans out, but we can handle all flags like exceptions
and RTTI in the future.
llvm-svn: 373511
|
|
|
|
|
|
|
|
| |
It turns out the benchmarks need to link against those libraries
explicitly too, so CMake's propagation of PUBLIC dependencies is
used.
llvm-svn: 373506
|
|
|
|
| |
llvm-svn: 373487
|
|
|
|
| |
llvm-svn: 373452
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wrap_buffer via gdb.execute.
Summary:
I haven't managed a small reproduction for this bug, it involves
complicated and deeply nested data structures with a wide variety
of pretty printers. But in general, we shouldn't be combining
gdb's command line interface (via gdb.execute) with pretty-printers.
Subscribers: christof, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68306
llvm-svn: 373402
|
|
|
|
| |
llvm-svn: 373390
|
|
|
|
|
|
|
|
|
| |
In reality, this workaround is for the fact that LIBCXX_CXX_ABI=libcxxabi
can't be specified on Linux, since libc++abi isn't shipped with the system.
Since the build bots explicitly specify LIBCXX_CXX_ABI=libcxxabi, they fail
unless we apply the workaround.
llvm-svn: 373385
|
|
|
|
|
|
|
|
|
|
| |
I tried applying D63883 three times and could never get around to
making it work. I'm giving up on that for now, but soon this should
be irrelevant anyway since all builds will move to the monorepo
(where we're always using the in-tree libc++abi unless explicitly
specified otherwise).
llvm-svn: 373384
|
|
|
|
|
|
|
| |
In C++03, we emulate static_assert with a macro, and we must parenthesize
multiple arguments.
llvm-svn: 373328
|
|
|
|
|
|
|
| |
Refactor the recent implicit default constructor changes to match the
existing SFINAE style.
llvm-svn: 373263
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
LWG 3158 marks the allocator_arg_t constructor of std::tuple as
conditionnally explicit based on whether the default constructors
of the tuple's members are explicitly default constructible.
This was previously committed as r372778 and reverted in r372832 due to
the commit breaking LLVM's build in C++14 mode. This issue has now been
addressed.
Reviewers: mclow.lists
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D65232
llvm-svn: 373092
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
LWG2510 makes tag types like allocator_arg_t explicitly default
constructible instead of implicitly default constructible. It also
makes the constructors for std::pair and std::tuple conditionally
explicit based on the explicit-ness of the default constructibility
for the pair/tuple's elements.
This was previously committed as r372777 and reverted in r372832 due to
the commit breaking LLVM's build in C++14 mode. This issue has now been
addressed.
Reviewers: mclow.lists
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D65161
llvm-svn: 372983
|
|
|
|
|
|
|
|
|
| |
Users should only get the assert() macros if they explicitly include
them.
Found after switching from the GNU C++ stdlib to the LLVM C++ stdlib.
llvm-svn: 372963
|
|
|
|
|
|
|
|
|
| |
We don't support GCC 4 and older according to the documentation, so
we should pretend it doesn't exist.
This is a re-application of r372787.
llvm-svn: 372916
|
|
|
|
|
|
|
|
| |
This declaration was previously missing despite appearing in the
synopsis. Users are still required to include <ostream> to get the
definition of the streaming operator.
llvm-svn: 372909
|
|
|
|
|
|
| |
comparison operators
llvm-svn: 372907
|
|
|
|
|
|
| |
as https://reviews.llvm.org/D67944
llvm-svn: 372896
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also reverts:
- r372778: [libc++] Implement LWG 3158
- r372782: [libc++] Try fixing tests that fail on GCC 5 and older
- r372787: Purge mentions of GCC 4 from the test suite
Reason: the change breaks compilation of LLVM with libc++, for details see
http://lists.llvm.org/pipermail/libcxx-dev/2019-September/000599.html
llvm-svn: 372832
|
|
|
|
|
|
|
| |
We don't support GCC 4 and older according to the documentation, so
we should pretend it doesn't exist.
llvm-svn: 372787
|
|
|
|
| |
llvm-svn: 372782
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: As suggested by @ldionne in D66178, this patch removes C++03 variadics //only//. Following patches will apply more updates.
Reviewers: ldionne, EricWF, mclow.lists
Subscribers: christof, dexonsmith, libcxx-commits, ldionne
Tags: #libc
Differential Revision: https://reviews.llvm.org/D67675
llvm-svn: 372780
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
LWG 3158 marks the allocator_arg_t constructor of std::tuple as
conditionnally explicit based on whether the default constructors
of the tuple's members are explicitly default constructible.
Reviewers: EricWF, mclow.lists
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D65232
llvm-svn: 372778
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
LWG2510 makes tag types like allocator_arg_t explicitly default
constructible instead of implicitly default constructible. It also
makes the constructors for std::pair and std::tuple conditionally
explicit based on the explicit-ness of the default constructibility
for the pair/tuple's elements.
Reviewers: mclow.lists, EricWF
Subscribers: christof, jkorous, dexonsmith, libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D65161
llvm-svn: 372777
|
|
|
|
|
|
| |
They do fail on AppleClang 10.0.0, but not AppleClang 10.0.1
llvm-svn: 372632
|
|
|
|
| |
llvm-svn: 372620
|