Revision tags: llvmorg-21-init |
|
#
80097a1f |
| 21-Jan-2025 |
A. Jiang <de34@live.cn> |
[libc++] Fix input-only range handling for `basic_string` (#116890)
By calling `std::move` for related functions when the iterator is
possibly input-only. Also slightly changes the conditions of br
[libc++] Fix input-only range handling for `basic_string` (#116890)
By calling `std::move` for related functions when the iterator is
possibly input-only. Also slightly changes the conditions of branch for
contiguous iterators to avoid error.
Fixes #116502
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 ...
|
#
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 |
|
#
5fd385b3 |
| 13-Dec-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Simplify the implementation of string and string_views operator== (#117184)
|
#
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 |
|
#
59f57be9 |
| 29-Nov-2024 |
Benjamin Kramer <benny.kra@googlemail.com> |
Revert "[libc++] Simplify the implementation of reserve() and shrink_to_fit() (#113453)"
This reverts commit d648eed5899c4be10f1f7866eebef2bc171e673f. Breaks anything that relies on sized deallocati
Revert "[libc++] Simplify the implementation of reserve() and shrink_to_fit() (#113453)"
This reverts commit d648eed5899c4be10f1f7866eebef2bc171e673f. Breaks anything that relies on sized deallocation, e.g. asan and tcmalloc.
show more ...
|
#
d648eed5 |
| 28-Nov-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Simplify the implementation of reserve() and shrink_to_fit() (#113453)
Since we changed the implementation of `reserve(size_type)` to only ever
extend,
it doesn't make a ton of sense anym
[libc++] Simplify the implementation of reserve() and shrink_to_fit() (#113453)
Since we changed the implementation of `reserve(size_type)` to only ever
extend,
it doesn't make a ton of sense anymore to have `__shrink_or_extend`,
since the code
paths of `reserve` and `shrink_to_fit` are now almost completely
separate.
This patch splits up `__shrink_or_extend` so that the individual parts
are in `reserve`
and `shrink_to_fit` depending on where they are needed.
show more ...
|
Revision tags: llvmorg-19.1.4 |
|
#
ec67ad59 |
| 18-Nov-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++][NFC] Format <string>
|
#
46d8aa8d |
| 14-Nov-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Make __throw_ member functions static (#116233)
Fixes #116092
|
#
5098b56d |
| 11-Nov-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Introduce a standalone __scope_guard and use it in <string> (#114867)
This introduces a new `__scope_guard` without any fancy features. The
scope guard is used in `<string>` to simplify so
[libc++] Introduce a standalone __scope_guard and use it in <string> (#114867)
This introduces a new `__scope_guard` without any fancy features. The
scope guard is used in `<string>` to simplify some of the ASan
annotations (especially by making it harder to forget them where
exceptions are thrown).
show more ...
|
#
4a68e4cb |
| 11-Nov-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Fix throwing away smaller allocations in string::shrink_to_fit (#115659)
Currently `string::shrink_to_fit()` throws away any allocations which
return more capacity than we requested, even
[libc++] Fix throwing away smaller allocations in string::shrink_to_fit (#115659)
Currently `string::shrink_to_fit()` throws away any allocations which
return more capacity than we requested, even if that allocation is still
smaller than the current capacity. This patch fixes this to compare the
returned allocation against the current capacity of the string instead
of against the requested capacity.
show more ...
|
#
c6f3b7bc |
| 06-Nov-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Refactor the configuration macros to being always defined (#112094)
This is a follow-up to #89178. This updates the `<__config_site>` macros.
|
#
b8f9063a |
| 05-Nov-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Simplify string::reserve (#114869)
We're checking quite a few things that are either trivially true or
trivially false. These cases became trivial when we changed `reserve()`
to never shr
[libc++] Simplify string::reserve (#114869)
We're checking quite a few things that are either trivially true or
trivially false. These cases became trivial when we changed `reserve()`
to never shrink.
show more ...
|
#
33af68a4 |
| 03-Nov-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Add a few _LIBCPP_ASSERT_INTERNALs to make sure internal invariants are kept (#114575)
This can make it significanly easier to find bugs when working on
string.
|
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 ...
|
#
5f909c0a |
| 02-Oct-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Remove some boilerplate from <string> after #76756 (#108952)
A few functions are now unnecessary, since we can access the members
directly instread now.
|
Revision tags: llvmorg-19.1.1, llvmorg-19.1.0 |
|
#
d95597dc |
| 16-Sep-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++][string] Remove potential non-trailing 0-length array (#108867)
It is a violation of the standard to use 0 length arrays, especially
when not at the end of a structure (not a FAM GNU extens
[libc++][string] Remove potential non-trailing 0-length array (#108867)
It is a violation of the standard to use 0 length arrays, especially
when not at the end of a structure (not a FAM GNU extension). Compiler
generally accept it, but it's probably better to have a conforming
implementation.
This is a re-application of #105865 which was reverted in 72cfc74
because it broke the data formatters. A LLDB patch has since been landed
that should make this a non-issue.
Co-authored-by: serge-sans-paille <sguelton@mozilla.com>
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 ...
|
#
17e0686a |
| 12-Sep-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Use [[__nodiscard__]] unconditionally (#80454)
`__has_cpp_attribute(__nodiscard__)` is always true now, so we might as
well replace `_LIBCPP_NODISCARD`. It's one less macro that can r
[libc++][NFC] Use [[__nodiscard__]] unconditionally (#80454)
`__has_cpp_attribute(__nodiscard__)` is always true now, so we might as
well replace `_LIBCPP_NODISCARD`. It's one less macro that can result in
bad diagnostics.
show more ...
|
#
748023dc |
| 11-Sep-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Replace _LIBCPP_NORETURN and TEST_NORETURN with [[noreturn]] (#80455)
`[[__noreturn__]]` is now always available, so we can simply use the
attribute directly instead of through a macr
[libc++][NFC] Replace _LIBCPP_NORETURN and TEST_NORETURN with [[noreturn]] (#80455)
`[[__noreturn__]]` is now always available, so we can simply use the
attribute directly instead of through a macro.
show more ...
|
#
d8a8eae6 |
| 10-Sep-2024 |
Daniel Thornburgh <dthorn@google.com> |
Revert "[libc++][string] Remove potential non-trailing 0-length array" (#108091)
Reverts llvm/llvm-project#105865
This breaks a pair of LLDB tests in CI.
|
#
ed0da008 |
| 10-Sep-2024 |
serge-sans-paille <sguelton@mozilla.com> |
[libc++][string] Remove potential non-trailing 0-length array (#105865)
It is a violation of the standard to use 0 length arrays, especially
when not at the end of a structure (not a FAM GNU extens
[libc++][string] Remove potential non-trailing 0-length array (#105865)
It is a violation of the standard to use 0 length arrays, especially
when not at the end of a structure (not a FAM GNU extension). Compiler
generally accept it, but it's probably better to have a conforming
implementation.
---------
Co-authored-by: Louis Dionne <ldionne.2@gmail.com>
show more ...
|
#
e4fdbcc2 |
| 04-Sep-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Add miscellaneous missing includes
|
#
c1a8283f |
| 04-Sep-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++][modules] Move __noexcept_move_assign_container out of __type_traits (#107140)
That header depends on allocator traits, which is fundamentally tied to
`<memory>`, not to `<type_traits>`. Th
[libc++][modules] Move __noexcept_move_assign_container out of __type_traits (#107140)
That header depends on allocator traits, which is fundamentally tied to
`<memory>`, not to `<type_traits>`. This breaks a cycle betweeen
__type_traits and __memory.
show more ...
|
Revision tags: llvmorg-19.1.0-rc4 |
|
#
348e7413 |
| 30-Aug-2024 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++][NFC] Run clang-format on libcxx/include
This re-formats a few headers that had become out-of-sync with respect to formatting since we ran clang-format on the whole codebase. There's surpris
[libc++][NFC] Run clang-format on libcxx/include
This re-formats a few headers that had become out-of-sync with respect to formatting since we ran clang-format on the whole codebase. There's surprisingly few instances of it.
show more ...
|