|
Revision tags: llvmorg-21-init, llvmorg-19.1.7 |
|
| #
b9a2658a |
| 21-Dec-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)
This patch implements the forwarding to frozen C++03 headers as discussed in https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-
[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)
This patch implements the forwarding to frozen C++03 headers as discussed in https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the RFC, we initially proposed selecting the right headers from the Clang driver, however consensus seemed to steer towards handling this in the library itself. This patch implements that direction.
At a high level, the changes basically amount to making each public header look like this:
``` // inside <vector> #ifdef _LIBCPP_CXX03_LANG # include <__cxx03/vector> #else // normal <vector> content #endif ```
In most cases, public headers are simple umbrella headers so there isn't much code in the #else branch. In other cases, the #else branch contains the actual implementation of the header.
show more ...
|
|
Revision tags: llvmorg-19.1.6 |
|
| #
c166a9c7 |
| 10-Dec-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Add #if 0 block to all the top-level headers (#119234)
Including The frozen C++03 headers results in a lot of formatting changes in the main headers, so this splits these changes into a sep
[libc++] Add #if 0 block to all the top-level headers (#119234)
Including The frozen C++03 headers results in a lot of formatting changes in the main headers, so this splits these changes into a separate commit instead.
This is part of https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.
show more ...
|
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4 |
|
| #
e99c4906 |
| 31-Oct-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize <cstddef> includes (#108696)
|
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
| #
dfddc0c4 |
| 18-Jul-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Include the rest of the detail headers by version in the umbrella headers (#96032)
This is a follow-up to #83740.
|
| #
31c9c418 |
| 10-Jul-2024 |
Hristo Hristov <hghristov.rmm@gmail.com> |
[libc++][tuple][utility] P2968R2: Make `std::ignore` a first-class object (#97401)
Implements: https://wg21.link/P2968R2
References:
- https://eel.is/c++draft/tuple.general
- https://eel.is/c+
[libc++][tuple][utility] P2968R2: Make `std::ignore` a first-class object (#97401)
Implements: https://wg21.link/P2968R2
References:
- https://eel.is/c++draft/tuple.general
- https://eel.is/c++draft/tuple.syn
- https://eel.is/c++draft/tuple.creation
- https://github.com/cplusplus/draft/milestone/31
- https://github.com/cplusplus/draft/pull/7109
- https://github.com/cplusplus/papers/issues/1640
- https://cplusplus.github.io/LWG/issue2933
- https://cplusplus.github.io/LWG/issue3978
---------
Co-authored-by: Hristo Hristov <zingam@outlook.com>
show more ...
|
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1 |
|
| #
37dca605 |
| 29-Feb-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Clean up includes of <__assert> (#80091)
Originally, we used __libcpp_verbose_abort to handle assertion failures.
That function was declared from all public headers. Since we don't use
th
[libc++] Clean up includes of <__assert> (#80091)
Originally, we used __libcpp_verbose_abort to handle assertion failures.
That function was declared from all public headers. Since we don't use
that mechanism anymore, we don't need to declare __libcpp_verbose_abort
from all public headers, and we can clean up a lot of unnecessary
includes.
This patch also moves the definition of the various assertion categories
to the <__assert> header, since we now rely on regular IWYU for these
assertion macros.
rdar://105510916
show more ...
|
|
Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
| #
6a664674 |
| 12-Dec-2023 |
Jakub Mazurkiewicz <mazkuba3@gmail.com> |
[libc++] P2770R0: Stashing stashing iterators for proper flattening (#66033)
- Partially implements P2770R0 (http://wg21.link/p2770)
- Fixes https://wg21.link/LWG3698, https://wg21.link/LWG3700, an
[libc++] P2770R0: Stashing stashing iterators for proper flattening (#66033)
- Partially implements P2770R0 (http://wg21.link/p2770)
- Fixes https://wg21.link/LWG3698, https://wg21.link/LWG3700, and https://wg21.link/LWG3791
- join_with_view hasn't been done yet since this type isn't implemented yet
- Rename tuple test directory to match the standard (which changed in P2770R0)
- Rename join_view test directory to match the standard
show more ...
|
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5 |
|
| #
71400505 |
| 17-May-2023 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Updates C++2b to C++23.
During the ISO C++ Committee meeting plenary session the C++23 Standard has been voted as technical complete.
This updates the reference to c++2b to c++23 and updat
[libc++] Updates C++2b to C++23.
During the ISO C++ Committee meeting plenary session the C++23 Standard has been voted as technical complete.
This updates the reference to c++2b to c++23 and updates the __cplusplus macro.
Note since we use clang-tidy 16 a small work-around is needed. Clang knows -std=c++23 but clang-tidy not so for now force the lit compiler flag to use -std=c++2b instead of -std=c++23.
Reviewed By: #libc, philnik, jloser, ldionne
Differential Revision: https://reviews.llvm.org/D150795
show more ...
|
|
Revision tags: llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2 |
|
| #
9e35fc07 |
| 07-Feb-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Clean up pair's constructors and assignment operators
This patch makes std::pair's constructors and assignment operators closer to conforming in C++23. The only missing bit I am aware of no
[libc++] Clean up pair's constructors and assignment operators
This patch makes std::pair's constructors and assignment operators closer to conforming in C++23. The only missing bit I am aware of now is `reference_constructs_from_temporary_v` checks, which we don't have the tools for yet.
This patch also refactors a long-standing non-standard extension where we'd provide constructors for tuple-like types in all standard modes. The criteria for being a tuple-like type are different from pair-like types as introduced recently in the standard, leading to a lot of complexity when trying to implement recent papers that touch the pair constructors.
After this patch, the pre-C++23 extension is provided in a self-contained block so that we can easily deprecate and eventually remove the extension in future releases.
Differential Revision: https://reviews.llvm.org/D143914
show more ...
|
| #
e2b15ec2 |
| 04-Apr-2023 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Rename __tuple_dir back to __tuple
This essentially reverts D139270
Reviewed By: #libc, EricWF
Spies: tahonermann, libcxx-commits, arichardson
Differential Revision: https://reviews.llvm
[libc++] Rename __tuple_dir back to __tuple
This essentially reverts D139270
Reviewed By: #libc, EricWF
Spies: tahonermann, libcxx-commits, arichardson
Differential Revision: https://reviews.llvm.org/D147519
show more ...
|
| #
882fba9f |
| 10-Mar-2023 |
Igor Zhukov <fsb4000@yandex.ru> |
[libc++][ranges] Implement LWG-3865 Sorting a range of pairs
Reviewed By: Mordante, philnik, ldionne, #libc
Differential Revision: https://reviews.llvm.org/D144262
|
| #
de6827b5 |
| 24-Feb-2023 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Improves clang-format settings.
Add a new test based .clang-format file which inherits from the generic one. This moves some test specific formatting rules to the test directory.
The main
[libc++] Improves clang-format settings.
Add a new test based .clang-format file which inherits from the generic one. This moves some test specific formatting rules to the test directory.
The main benefit is that headers are sorted, which makes it more likely to catch these errors before creating a review instead of spotting the error in the CI clang-tidy step.
Reviewed By: ldionne, philnik, #libc
Differential Revision: https://reviews.llvm.org/D144755
show more ...
|
|
Revision tags: llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
| #
7458908f |
| 08-Dec-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Improve binary size when using __transaction
__exception_guard is a no-op in -fno-exceptions mode to produce better code-gen. This means that we don't provide the strong exception guarantee
[libc++] Improve binary size when using __transaction
__exception_guard is a no-op in -fno-exceptions mode to produce better code-gen. This means that we don't provide the strong exception guarantees. However, Clang doesn't generate cleanup code with exceptions disabled, so even if we wanted to provide the strong exception guarantees we couldn't. This is also only relevant for constructs with a stack of -fexceptions > -fno-exceptions > -fexceptions code, since the exception can't be caught where exceptions are disabled. While -fexceptions > -fno-exceptions is quite common (e.g. libc++.dylib > -fno-exceptions), having another layer with exceptions enabled seems a lot less common, especially one that tries to catch an exception through -fno-exceptions code.
Fixes https://github.com/llvm/llvm-project/issues/56783
Reviewed By: ldionne, Mordante, huixie90, #libc
Spies: EricWF, alexfh, hans, joanahalili, libcxx-commits
Differential Revision: https://reviews.llvm.org/D133661
show more ...
|
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
| #
678dd9a5 |
| 10-Aug-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Improve the implementation of std::unreachable
First, use __builtin_unreachable unconditionally. It is implemented by all the compilers that we support. Clang started supporting it around C
[libc++] Improve the implementation of std::unreachable
First, use __builtin_unreachable unconditionally. It is implemented by all the compilers that we support. Clang started supporting it around Clang 4, and GCC around GCC 4.10.
Also add _LIBCPP_ASSERT so that we will actually get a guaranteed crash if we reached `std::unreachable()` and assertions have been enabled, since that's UB that's extremely easy to catch.
Differential Revision: https://reviews.llvm.org/D131620
show more ...
|
| #
947dfc95 |
| 20-Dec-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize <type_traits> includes in <utility>
Reviewed By: Mordante, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D140426
|
| #
ec11388b |
| 04-Dec-2022 |
Michał Górny <mgorny@gentoo.org> |
[libc++] Rename __tuple to __tuple_dir to avoid file collision
Rename the `__tuple` directory in libc++ headers to `__tuple_dir` to avoid file collision when installing. Historically, `__tuple` has
[libc++] Rename __tuple to __tuple_dir to avoid file collision
Rename the `__tuple` directory in libc++ headers to `__tuple_dir` to avoid file collision when installing. Historically, `__tuple` has been a file and it has been replaced by a directory in 2d52c6bfae801b016dd3627b8c0e7c4a99405549. Replacing a regular file with a directory (or more importantly, the other way around when downgrading) is not universally supported. Since this is an internal header, its actual name should not matter, so just rename it to avoid problems.
Differential Revision: https://reviews.llvm.org/D139270
show more ...
|
| #
83ead2bb |
| 09-Aug-2022 |
Hui Xie <hui.xie1990@gmail.com> |
[libc++] implement "pair" section of P2321R2 `zip`
Differential Revision: https://reviews.llvm.org/D131495
|
| #
2d52c6bf |
| 05-Sep-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize __tuple
Reviewed By: ldionne, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D133081
|
| #
e31c2a1b |
| 02-Sep-2022 |
Mark de Wever <koraq@xs4all.nl> |
[NFC][libc++] Moves transitive includes location.
As discussed in D132284 they will be moved to the end.
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D133212
|
| #
3a49cffe |
| 21-Aug-2022 |
Igor Zhukov <fsb4000@yandex.ru> |
[libc++] Implement P2445R1 (`std::forward_like`)
Co-authored-by: A. Jiang <de34@live.cn>
Reviewed By: philnik, huixie90, #libc
Differential Revision: https://reviews.llvm.org/D132327
|
| #
8ff2d6af |
| 20-Aug-2022 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Reduces the number of transitive includes.
This defines a new policy for removal of transitive includes. The goal of the policy it to make it relatively easy to remove headers when needed,
[libc++] Reduces the number of transitive includes.
This defines a new policy for removal of transitive includes. The goal of the policy it to make it relatively easy to remove headers when needed, but avoid breaking developers using and vendors shipping libc++.
The method used is to guard transitive includes based on the C++ language version. For the upcoming C++23 we can remove headers when we want, but for other language versions we try to keep it to a minimum.
In this code the transitive include of `<chrono>` is removed since D128577 introduces a header cycle between `<format>` and `<chrono>`. This cycle is indirectly required by the Standard. Our cycle dependency tool basically is a grep based tool, so it needs some hints to ignore cycles. With the input of our transitive include tests we can create a better tool. However that's out of the scope of this patch.
Note the flag `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES` remains unchanged. So users can still opt-out of transitives includes entirely.
Reviewed By: #libc, ldionne, philnik
Differential Revision: https://reviews.llvm.org/D132284
show more ...
|
|
Revision tags: llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
de4a57cb |
| 27-Jun-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Re-add transitive includes that had been removed since LLVM 14
This commit re-adds transitive includes that had been removed by 4cd04d1687f1, c36870c8e79c, a83f4b9cda57, 1458458b558d, 2e2f3
[libc++] Re-add transitive includes that had been removed since LLVM 14
This commit re-adds transitive includes that had been removed by 4cd04d1687f1, c36870c8e79c, a83f4b9cda57, 1458458b558d, 2e2f3158c604, and 489637e66dd3. This should cover almost all the includes that had been removed since LLVM 14 and that would contribute to breaking user code when releasing LLVM 15.
It is possible to disable the inclusion of these headers by defining _LIBCPP_REMOVE_TRANSITIVE_INCLUDES. The intent is that vendors will enable that macro and start fixing downstream issues immediately. We can then remove the macro (and the transitive includes) by default in a future release. That way, we will break users only once by removing transitive includes in bulk instead of doing it bit by bit a every release, which is more disruptive for users.
Note 1: The set of headers to re-add was found by re-generating the transitive include test on a checkout of release/14.x, which provided the list of all transitive includes we used to provide.
Note 2: Several includes of <vector>, <optional>, <array> and <unordered_map> have been added in this commit. These transitive inclusions were added when we implemented boyer_moore_searcher in <functional>.
Note 3: This is a best effort patch to try and resolve downstream breakage caused since branching LLVM 14. I wasn't able to perfectly mirror transitive includes in LLVM 14 for a few headers, so I added a release note explaining it. To summarize, adding boyer_moore_searcher created a bunch of circular dependencies, so we have to break backwards compatibility in a few cases.
Differential Revision: https://reviews.llvm.org/D128661
show more ...
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
db1978b6 |
| 16-Jun-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Mark standard-mandated includes as such
Reviewed By: ldionne, Mordante, #libc, saugustine
Spies: saugustine, MaskRay, arichardson, mstorsjo, jloser, libcxx-commits, arphaman
Differential
[libc++] Mark standard-mandated includes as such
Reviewed By: ldionne, Mordante, #libc, saugustine
Spies: saugustine, MaskRay, arichardson, mstorsjo, jloser, libcxx-commits, arphaman
Differential Revision: https://reviews.llvm.org/D127953
show more ...
|
|
Revision tags: llvmorg-14.0.5 |
|
| #
1972d1e8 |
| 10-Jun-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize even more of type_traits
Reviewed By: ldionne, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D126593
|
|
Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
385cc25a |
| 25-Mar-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Ensure that all public C++ headers include <__assert>
This patch changes the requirement for getting the declaration of the assertion handler from including <__assert> to including any publ
[libc++] Ensure that all public C++ headers include <__assert>
This patch changes the requirement for getting the declaration of the assertion handler from including <__assert> to including any public C++ header of the library. Note that C compatibility headers are excluded because we don't implement all the C headers ourselves -- some of them are taken straight from the C library, like assert.h.
It also adds a generated test to check it. Furthermore, this new generated test is designed in a way that will make it possible to replace almost all the existing test-generation scripts with this system in upcoming patches.
Differential Revision: https://reviews.llvm.org/D122506
show more ...
|