| #
4cd04d16 |
| 13-Jun-2022 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Removes unneeded <iterator> includes.
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D127675
|
| #
3cd4531b |
| 10-Jun-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize <iterator> includes
Reviewed By: ldionne, #libc
Spies: libcxx-commits, wenlei
Differential Revision: https://reviews.llvm.org/D127445
|
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1 |
|
| #
f3966eaf |
| 01-Apr-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Make the Debug mode a configuration-time only option
The debug mode has been broken pretty much ever since it was shipped because it was possible to enable the debug mode in user code witho
[libc++] Make the Debug mode a configuration-time only option
The debug mode has been broken pretty much ever since it was shipped because it was possible to enable the debug mode in user code without actually enabling it in the dylib, leading to ODR violations that caused various kinds of failures.
This commit makes the debug mode a knob that is configured when building the library and which can't be changed afterwards. This is less flexible for users, however it will actually work as intended and it will allow us, in the future, to add various kinds of checks that do not assume the same ABI as the normal library. Furthermore, this will make the debug mode more robust, which means that vendors might be more tempted to support it properly, which hasn't been the case with the current debug mode.
This patch shouldn't break any user code, except folks who are building against a library that doesn't have the debug mode enabled and who try to enable the debug mode in their code. Such users will get a compile-time error explaining that this configuration isn't supported anymore.
In the future, we should further increase the granularity of the debug mode checks so that we can cherry-pick which checks to enable, like we do for unspecified behavior randomization.
Differential Revision: https://reviews.llvm.org/D122941
show more ...
|
| #
34f73804 |
| 20-May-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Remove unused __functional includes
Reviewed By: ldionne, #libc
Spies: arichardson, smeenai, libcxx-commits, arphaman
Differential Revision: https://reviews.llvm.org/D126098
|
| #
08f68dfe |
| 07-May-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Add a few more debug wrapper functions
Reviewed By: ldionne, #libc, jloser
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D125176
|
| #
a83f4b9c |
| 23-Apr-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Remove <functional> includes
Reviewed By: var-const, #libc, ldionne
Spies: #libc_vendors, ldionne, libcxx-commits, miyuki
Differential Revision: https://reviews.llvm.org/D124123
|
| #
faef447e |
| 17-Apr-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize <functional> includes
Reviewed By: Mordante, #libc
Spies: libcxx-commits, miyuki
Differential Revision: https://reviews.llvm.org/D123912
|
| #
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 ...
|
| #
3c6bd176 |
| 18-Mar-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Rename __identity to __type_identity
In C++20 the type trait `type_identity` was introduced. For the same purpose there is `__identity` for pre-C++20 code. The name is confusing, because si
[libc++] Rename __identity to __type_identity
In C++20 the type trait `type_identity` was introduced. For the same purpose there is `__identity` for pre-C++20 code. The name is confusing, because since C++20 there is also `identity`, which isn't a type trait.
Reviewed By: ldionne, Mordante, #libc
Spies: EricWF, libcxx-commits
Differential Revision: https://reviews.llvm.org/D122017
show more ...
|
| #
c87c8917 |
| 24-Mar-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Audit all uses of _LIBCPP_ASSERT and _LIBCPP_DEBUG_ASSERT
I audited all uses of _LIBCPP_ASSERT to make sure that we only used it for "basic assertions", i.e. assertions with constant-time c
[libc++] Audit all uses of _LIBCPP_ASSERT and _LIBCPP_DEBUG_ASSERT
I audited all uses of _LIBCPP_ASSERT to make sure that we only used it for "basic assertions", i.e. assertions with constant-time conditions. I also audited all uses of _LIBCPP_DEBUG_ASSERT to make sure we used it only for debug-mode assertions, and in one case had to change for _LIBCPP_ASSERT instead.
As a fly-by, I also changed a couple of tests against nullptr or 0 to be more explicit.
After this patch, all uses of _LIBCPP_ASSERT should be with constant-time conditions, and all uses of _LIBCPP_DEBUG_ASSERT should be with conditions that we only want to check when the debug mode is enabled.
Differential Revision: https://reviews.llvm.org/D122395
show more ...
|
|
Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
f87aa19b |
| 14-Feb-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Move everything related solely to _LIBCPP_ASSERT to its own file
This is the first step towards disentangling the debug mode and assertions in libc++. This patch doesn't make any functional
[libc++] Move everything related solely to _LIBCPP_ASSERT to its own file
This is the first step towards disentangling the debug mode and assertions in libc++. This patch doesn't make any functional change: it simply moves _LIBCPP_ASSERT-related stuff to its own file so as to make it clear that libc++ assertions and the debug mode are different things. Future patches will make it possible to enable assertions without enabling the debug mode.
Differential Revision: https://reviews.llvm.org/D119769
show more ...
|
| #
2e2f3158 |
| 15-Feb-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize algorithm includes
Reviewed By: Mordante, ldionne, Quuxplusone, #libc, #libc_abi
Spies: #libc_vendors, libcxx-commits, miyuki
Differential Revision: https://reviews.llvm.org/D
[libc++] Granularize algorithm includes
Reviewed By: Mordante, ldionne, Quuxplusone, #libc, #libc_abi
Spies: #libc_vendors, libcxx-commits, miyuki
Differential Revision: https://reviews.llvm.org/D119667
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init |
|
| #
fa6b9e40 |
| 02-Feb-2022 |
Arthur O'Dwyer <arthur.j.odwyer@gmail.com> |
[libc++] Normalize all our '#pragma GCC system_header', and regression-test.
Now we'll notice if a header forgets to include this magic phrase.
Differential Revision: https://reviews.llvm.org/D1188
[libc++] Normalize all our '#pragma GCC system_header', and regression-test.
Now we'll notice if a header forgets to include this magic phrase.
Differential Revision: https://reviews.llvm.org/D118800
show more ...
|
| #
26544b98 |
| 21-Jan-2022 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Use addressof in unordered_set.
This addresses the usage of `operator&` in `<unordered_set>`.
(Note there are still more headers with the same issue.)
Reviewed By: #libc, philnik, Quuxplu
[libc++] Use addressof in unordered_set.
This addresses the usage of `operator&` in `<unordered_set>`.
(Note there are still more headers with the same issue.)
Reviewed By: #libc, philnik, Quuxplusone
Differential Revision: https://reviews.llvm.org/D117917
show more ...
|
|
Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
e3cf7050 |
| 10-Jan-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Introduce __debug_db_insert_c()
There are a lot of ``` #if _LIBCPP_DEBUG_LEVEL == 2 __get_db()->__insert_c(this); #endif ```
This patch introduces `__debug_db_insert_c()` to put the `#
[libc++] Introduce __debug_db_insert_c()
There are a lot of ``` #if _LIBCPP_DEBUG_LEVEL == 2 __get_db()->__insert_c(this); #endif ```
This patch introduces `__debug_db_insert_c()` to put the `#if` in one central place.
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D116947
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1 |
|
| #
eb8650a7 |
| 17-Nov-2021 |
Louis Dionne <ldionne.2@gmail.com> |
[runtimes][NFC] Remove filenames at the top of the license notice
We've stopped doing it in libc++ for a while now because these names would end up rotting as we move things around and copy/paste st
[runtimes][NFC] Remove filenames at the top of the license notice
We've stopped doing it in libc++ for a while now because these names would end up rotting as we move things around and copy/paste stuff. This cleans up all the existing files so as to stop the spreading as people copy-paste headers around.
show more ...
|
| #
68072a71 |
| 09-Nov-2021 |
Konstantin Varlamov <varconst@apple.com> |
[libc++] P0433R2: test that deduction guides are properly SFINAEd away.
Deduction guides for containers should not participate in overload resolution when called with certain incorrect types (e.g. w
[libc++] P0433R2: test that deduction guides are properly SFINAEd away.
Deduction guides for containers should not participate in overload resolution when called with certain incorrect types (e.g. when called with a template argument in place of an `InputIterator` that doesn't qualify as an input iterator). Similarly, class template argument deduction should not select `unique_ptr` constructors that take a a pointer.
The tests try out every possible incorrect parameter (but never more than one incorrect parameter in the same invocation).
Also add deduction guides to the synopsis for associative and unordered containers (this was accidentally omitted from [D112510](https://reviews.llvm.org/D112510)).
Differential Revision: https://reviews.llvm.org/D112904
show more ...
|
|
Revision tags: llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3 |
|
| #
d5db71d1 |
| 31-Aug-2021 |
Arthur O'Dwyer <arthur.j.odwyer@gmail.com> |
[libc++] [P0919] Some belated review on D87171.
- Simplify the structure of the new tests. - Test const containers as well as non-const containers, since it's easy to do so. - Remove redundant e
[libc++] [P0919] Some belated review on D87171.
- Simplify the structure of the new tests. - Test const containers as well as non-const containers, since it's easy to do so. - Remove redundant enable-iffing of helper structs' member functions. (They're not instantiated unless they're called, and who would call them?) - Fix indentation and use more consistent SFINAE method in <unordered_map>. - Add _LIBCPP_INLINE_VISIBILITY on some swap functions.
Differential Revision: https://reviews.llvm.org/D109011
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc2 |
|
| #
4e0ea2cf |
| 17-Aug-2021 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Use enable_if_t instead of _EnableIf
I just ran into a compiler error involving __bind_back and some overloads that were being disabled with _EnableIf. I noticed that the error message was
[libc++] Use enable_if_t instead of _EnableIf
I just ran into a compiler error involving __bind_back and some overloads that were being disabled with _EnableIf. I noticed that the error message was quite bad and did not mention the reason for the overload being excluded. Specifically, the error looked like this:
candidate template ignored: substitution failure [with _Args = <ContiguousView>]: no member named '_EnableIfImpl' in 'std::_MetaBase<false>'
Instead, when using enable_if or enable_if_t, the compiler is clever and can produce better diagnostics, like so:
candidate template ignored: requirement 'is_invocable_v< std::__bind_back_op<1, std::integer_sequence<unsigned long, 0>>, std::ranges::views::__transform::__fn &, std::tuple<PlusOne> &, ContiguousView>' was not satisfied [with _Args = <ContiguousView>]
Basically, it tries to do a poor man's implementation of concepts, which is already a lot better than simply complaining about substitution failure.
Hence, this commit uses enable_if_t instead of _EnableIf whenever possible. That is both more straightforward than using the internal helper, and also leads to better error messages in those cases.
I understand the motivation for _EnableIf's implementation was to improve compile-time performance, however I believe striving to improve error messages is even more important for our QOI, hence this patch. Furthermore, it is unclear that _EnableIf actually improved compile-time performance in any noticeable way (see discussion in the review for details).
Differential Revision: https://reviews.llvm.org/D108216
show more ...
|
| #
01666904 |
| 17-Aug-2021 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Remove workarounds for the lack of deduction guides in C++17
All supported compilers have supported deduction guides in C++17 for a while, so this isn't necessary anymore.
Differential Rev
[libc++] Remove workarounds for the lack of deduction guides in C++17
All supported compilers have supported deduction guides in C++17 for a while, so this isn't necessary anymore.
Differential Revision: https://reviews.llvm.org/D108213
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init |
|
| #
050b064f |
| 01-Jul-2021 |
Christopher Di Bella <cjdb@google.com> |
[libcxx][functional][modular] splices <functional> into modular headers
Differential Revision: https://reviews.llvm.org/D104942
|
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2 |
|
| #
6adbc83e |
| 05-Jun-2021 |
Christopher Di Bella <cjdb@google.com> |
[libcxx][modularisation] moves <utility> content out of <type_traits>
Moves:
* `std::move`, `std::forward`, `std::declval`, and `std::swap` into `__utility/${FUNCTION_NAME}`. * `std::swap_ranges`
[libcxx][modularisation] moves <utility> content out of <type_traits>
Moves:
* `std::move`, `std::forward`, `std::declval`, and `std::swap` into `__utility/${FUNCTION_NAME}`. * `std::swap_ranges` and `std::iter_swap` into `__algorithm/${FUNCTION_NAME}`
Differential Revision: https://reviews.llvm.org/D103734
show more ...
|
|
Revision tags: llvmorg-12.0.1-rc1 |
|
| #
bfbd73f8 |
| 19-May-2021 |
Arthur O'Dwyer <arthur.j.odwyer@gmail.com> |
[libc++] Alphabetize and include-what-you-use. NFCI.
Differential Revision: https://reviews.llvm.org/D102781
|
| #
4cd6ca10 |
| 20-Apr-2021 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] NFC: Normalize `#endif //` comment indentation
|
|
Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4 |
|
| #
2d0f1fa4 |
| 24-Mar-2021 |
Arthur O'Dwyer <arthur.j.odwyer@gmail.com> |
[libc++] Header inclusion tests.
As mandated by the Standard's various synopses, e.g. [iterator.synopsis]. Searching the TeX source for '#include' is a good way to find all of these mandates.
The n
[libc++] Header inclusion tests.
As mandated by the Standard's various synopses, e.g. [iterator.synopsis]. Searching the TeX source for '#include' is a good way to find all of these mandates.
The new tests are all autogenerated by utils/generate_header_inclusion_tests.py. I was SHOCKED by how many mandates there are, and how many of them libc++ wasn't conforming with.
Differential Revision: https://reviews.llvm.org/D99309
show more ...
|