|
Revision tags: llvmorg-21-init |
|
| #
0fa05456 |
| 20-Jan-2025 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Define an internal API for std::invoke and friends (#116637)
Currently we're using quite different internal names for the `std::invoke` family of type traits. This adds a layer around the c
[libc++] Define an internal API for std::invoke and friends (#116637)
Currently we're using quite different internal names for the `std::invoke` family of type traits. This adds a layer around the current implementation to make it easier to understand when it is used and makes it easier to define multiple implementations of it.
show more ...
|
|
Revision tags: llvmorg-19.1.7 |
|
| #
f6958523 |
| 08-Jan-2025 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Put _LIBCPP_NODEBUG on all internal aliases (#118710)
This significantly reduces the amount of debug information generated
for codebases using libc++, without hurting the debugging experie
[libc++] Put _LIBCPP_NODEBUG on all internal aliases (#118710)
This significantly reduces the amount of debug information generated
for codebases using libc++, without hurting the debugging experience.
show more ...
|
| #
b905bcc5 |
| 18-Dec-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Remove some unused includes (#120219)
|
|
Revision tags: llvmorg-19.1.6 |
|
| #
9474e094 |
| 13-Dec-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Granularize the <new> header (#119270)
This disentangles the code which previously had a mix of many #ifdefs, a
non-versioned namespace and a versioned namespace. It also makes it
clearer
[libc++] Granularize the <new> header (#119270)
This disentangles the code which previously had a mix of many #ifdefs, a
non-versioned namespace and a versioned namespace. It also makes it
clearer which parts of <new> are implemented on Windows by including <new.h>.
show more ...
|
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4 |
|
| #
de87dda2 |
| 04-Nov-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Use more appropriate type traits for a few cases (#114025)
|
| #
e99c4906 |
| 31-Oct-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize <cstddef> includes (#108696)
|
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2 |
|
| #
ba87515f |
| 12-Oct-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][RFC] Always define internal feature test macros (#89178)
Currently, the library-internal feature test macros are only defined if
the feature is not available, and always have the prefix
`
[libc++][RFC] Always define internal feature test macros (#89178)
Currently, the library-internal feature test macros are only defined if
the feature is not available, and always have the prefix
`_LIBCPP_HAS_NO_`. This patch changes that, so that they are always
defined and have the prefix `_LIBCPP_HAS_` instead. This changes the
canonical use of these macros to `#if _LIBCPP_HAS_FEATURE`, which means
that using an undefined macro (e.g. due to a missing include) is
diagnosed now. While this is rather unlikely currently, a similar change
in `<__configuration/availability.h>` caught a few bugs. This also
improves readability, since it removes the double-negation of `#ifndef
_LIBCPP_HAS_NO_FEATURE`.
The current patch only touches the macros defined in `<__config>`. If
people are happy with this approach, I'll make a follow-up PR to also
change the macros defined in `<__config_site>`.
show more ...
|
|
Revision tags: llvmorg-19.1.1, llvmorg-19.1.0 |
|
| #
09e3a360 |
| 16-Sep-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++][modules] Fix missing and incorrect includes (#108850)
This patch adds a large number of missing includes in the libc++ headers
and the test suite. Those were found as part of the effort to
[libc++][modules] Fix missing and incorrect includes (#108850)
This patch adds a large number of missing includes in the libc++ headers
and the test suite. Those were found as part of the effort to move
towards a mostly monolithic top-level std module.
show more ...
|
| #
01df775d |
| 16-Sep-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Take the ABI break for `std::list`'s pointer UB unconditionally (#100585)
This ABI break only affects fancy pointer which have a different value
representation when pointing to a base of T
[libc++] Take the ABI break for `std::list`'s pointer UB unconditionally (#100585)
This ABI break only affects fancy pointer which have a different value
representation when pointing to a base of T instead of T itself. This
seems like a rather small set of fancy pointers, which themselves
already represent a very small niche. This patch swaps a pointer to T
with a pointer to base of T in a few library-internal types.
show more ...
|
| #
27c83382 |
| 16-Sep-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Replace `__compressed_pair` with `[[no_unique_address]]` (#76756)
This significantly simplifies the code, improves compile times and improves the object layout of types using `__compressed_
[libc++] Replace `__compressed_pair` with `[[no_unique_address]]` (#76756)
This significantly simplifies the code, improves compile times and improves the object layout of types using `__compressed_pair` in the unstable ABI. The only downside is that this is extremely ABI sensitive and pedantically breaks the ABI for empty final types, since the address of the subobject may change. The ABI of the whole object should not be affected.
Fixes #91266 Fixes #93069
show more ...
|
|
Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2 |
|
| #
0dd8c0dd |
| 04-Aug-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Remove a few includes from <__hash_table> (#99738)
|
|
Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init |
|
| #
cb417401 |
| 18-Jun-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Refactor<__type_traits/is_swappable.h> (#86822)
This changes the `is_swappable` implementation to use variable templates
first and basing the class templates on that. This avoids instantia
[libc++] Refactor<__type_traits/is_swappable.h> (#86822)
This changes the `is_swappable` implementation to use variable templates
first and basing the class templates on that. This avoids instantiating
them when the `_v` versions are used, which are generally less resource
intensive.
show more ...
|
| #
6b4b29f8 |
| 18-Jun-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Remove unnecessary parens in static_asserts (#95605)
These were required a long time ago due to `static_assert` not actually
being available in C++03. Now `static_assert` is simply ma
[libc++][NFC] Remove unnecessary parens in static_asserts (#95605)
These were required a long time ago due to `static_assert` not actually
being available in C++03. Now `static_assert` is simply mapped to
`_Static_assert` in C++03, making the additional parens unnecessary.
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 |
|
| #
580f6048 |
| 18-Mar-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Merge is{,_nothrow,_trivially}{,_copy,_move,_default}{_assignable,_constructible} (#85308)
These headers have become very small by using compiler builtins, often
containing only two d
[libc++][NFC] Merge is{,_nothrow,_trivially}{,_copy,_move,_default}{_assignable,_constructible} (#85308)
These headers have become very small by using compiler builtins, often
containing only two declarations. This merges these headers, since
there doesn't seem to be much of a benefit keeping them separate.
Specifically, `is_{,_nothrow,_trivially}{assignable,constructible}` are
kept and the `copy`, `move` and `default` versions of these type traits
are moved in to the respective headers.
show more ...
|
| #
41658baf |
| 12-Mar-2024 |
David Benjamin <davidben@google.com> |
[libc++][hardening] Add iterator validity checks on unordered containers (#80230)
These are simply null checks, so use `_LIBCPP_ASSERT_NON_NULL`. This
allows us to restore a bunch of the old debug
[libc++][hardening] Add iterator validity checks on unordered containers (#80230)
These are simply null checks, so use `_LIBCPP_ASSERT_NON_NULL`. This
allows us to restore a bunch of the old debug tests. I've extended them
to also cover the const iterators, as those run through different
codepaths than the const ones.
This does the easier (and less important) half of #80212.
show more ...
|
|
Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3 |
|
| #
76a24727 |
| 20-Feb-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Refactor more __enable_ifs to the canonical style (#81457)
This brings the code base closer to having only a single style of
`enable_if`s.
|
|
Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
| #
dc577520 |
| 21-Jan-2024 |
Konstantin Varlamov <varconsteq@gmail.com> |
[libc++][hardening] Categorize assertions that produce incorrect results (#77183)
Introduce a new `argument-within-domain` category that covers cases
where the given arguments make it impossible to
[libc++][hardening] Categorize assertions that produce incorrect results (#77183)
Introduce a new `argument-within-domain` category that covers cases
where the given arguments make it impossible to produce a correct result
(or create a valid object in case of constructors). While the incorrect
result doesn't create an immediate problem within the library (like e.g.
a null pointer dereference would), it always indicates a logic error in
user code and is highly likely to lead to a bug in the program once the
value is used.
show more ...
|
| #
4f215fdd |
| 06-Jan-2024 |
Konstantin Varlamov <varconsteq@gmail.com> |
[libc++][hardening] Categorize more assertions. (#75918)
Also introduce `_LIBCPP_ASSERT_PEDANTIC` for assertions violating which
results in a no-op or other benign behavior, but which may neverthel
[libc++][hardening] Categorize more assertions. (#75918)
Also introduce `_LIBCPP_ASSERT_PEDANTIC` for assertions violating which
results in a no-op or other benign behavior, but which may nevertheless
indicate a bug in the invoking code.
show more ...
|
| #
9783f28c |
| 18-Dec-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Format the code base (#74334)
This patch runs clang-format on all of libcxx/include and libcxx/src, in
accordance with the RFC discussed at [1]. Follow-up patches will format
the benchmar
[libc++] Format the code base (#74334)
This patch runs clang-format on all of libcxx/include and libcxx/src, in
accordance with the RFC discussed at [1]. Follow-up patches will format
the benchmarks, the test suite and remaining parts of the code. I'm
splitting this one into its own patch so the diff is a bit easier to
review.
This patch was generated with:
find libcxx/include libcxx/src -type f \
| grep -v 'module.modulemap.in' \
| grep -v 'CMakeLists.txt' \
| grep -v 'README.txt' \
| grep -v 'libcxx.imp' \
| grep -v '__config_site.in' \
| xargs clang-format -i
A Git merge driver is available in libcxx/utils/clang-format-merge-driver.sh
to help resolve merge and rebase issues across these formatting changes.
[1]: https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all
show more ...
|
| #
77a00c0d |
| 05-Dec-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Replace uses of _VSTD:: by std:: (#74331)
As part of the upcoming clang-formatting of libc++, this patch performs
the long desired removal of the _VSTD macro.
See https://discourse.llvm
[libc++] Replace uses of _VSTD:: by std:: (#74331)
As part of the upcoming clang-formatting of libc++, this patch performs
the long desired removal of the _VSTD macro.
See https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all
for the clang-format proposal.
show more ...
|
| #
4c198542 |
| 04-Dec-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI (#74095)
In preparation for running clang-format on the whole code base, we are
also removing mentions of the legacy _LIBCPP_INLIN
[libc++] Rename _LIBCPP_INLINE_VISIBILITY to _LIBCPP_HIDE_FROM_ABI (#74095)
In preparation for running clang-format on the whole code base, we are
also removing mentions of the legacy _LIBCPP_INLINE_VISIBILITY macro in
favor of the newer _LIBCPP_HIDE_FROM_ABI.
We're still leaving the definition of _LIBCPP_INLINE_VISIBILITY to avoid
creating needless breakage in case some older patches are checked-in
with mentions of the old macro. After we branch for LLVM 18, we can do
another pass to clean up remaining uses of the macro that might have
gotten introduced by mistake (if any) and remove the macro itself at the
same time. This is just a minor convenience to smooth out the transition
as much as possible.
See
https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all
for the clang-format proposal.
show more ...
|
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3 |
|
| #
ba79fb2e |
| 13-Oct-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Re-apply "Remove UB in list, forward_list and __hash_table"
This patch removes undefined behavior in list and forward_list and __hash_table caused by improperly beginning and ending the lif
[libc++] Re-apply "Remove UB in list, forward_list and __hash_table"
This patch removes undefined behavior in list and forward_list and __hash_table caused by improperly beginning and ending the lifetime of the various node classes. It allows removing the _LIBCPP_STANDALONE_DEBUG macro from these node types since we now properly begin and end their lifetime, meaning that we won't trip up constructor homing.
See https://reviews.llvm.org/D98750 for more information on what prompted this patch.
This commit re-applies 0687e4d9f310, which had been reverted in b935882bdce7 because it broke the LLDB build. LLDB folks tell me I can go ahead and re-commit this now.
Differential Revision: https://reviews.llvm.org/D101206
Co-authored-by: Amy Kwan <amy.kwan1@ibm.com>
show more ...
|
| #
b935882b |
| 06-Oct-2023 |
Krasimir Georgiev <krasimir@google.com> |
Revert "[libc++] Remove UB in list, forward_list and __hash_table"
This reverts commit 0687e4d9f310249a45c3799ec66aeeeb0efda9f7. Causes LLDB failures: https://reviews.llvm.org/D101206#4653253
|
|
Revision tags: llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0 |
|
| #
0687e4d9 |
| 07-Sep-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Remove UB in list, forward_list and __hash_table
This patch removes undefined behavior in list and forward_list and __hash_table caused by improperly beginning and ending the lifetime of th
[libc++] Remove UB in list, forward_list and __hash_table
This patch removes undefined behavior in list and forward_list and __hash_table caused by improperly beginning and ending the lifetime of the various node classes. It allows removing the _LIBCPP_STANDALONE_DEBUG macro from these node types since we now properly begin and end their lifetime, meaning that we won't trip up constructor homing.
See https://reviews.llvm.org/D98750 for more information on what prompted this patch.
Differential Revision: https://reviews.llvm.org/D101206
Co-authored-by: Amy Kwan <amy.kwan1@ibm.com>
show more ...
|
|
Revision tags: llvmorg-17.0.0-rc4 |
|
| #
9f3e3efd |
| 02-Sep-2023 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Refactor __enable_if return types to defaulted template parameters
This brings most of the enable_ifs in libc++ to the same style. It also has the nice side-effect of reducing the size
[libc++][NFC] Refactor __enable_if return types to defaulted template parameters
This brings most of the enable_ifs in libc++ to the same style. It also has the nice side-effect of reducing the size of names of these symbols, since the depedent return type is shorter.
Reviewed By: #libc, ldionne
Spies: ldionne, libcxx-commits
Differential Revision: https://reviews.llvm.org/D157787
show more ...
|