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, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0 |
|
#
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 ...
|
Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5 |
|
#
83bc7b57 |
| 22-Apr-2024 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Remove _LIBCPP_DISABLE_NODISCARD_EXTENSIONS and refactor the tests (#87094)
This also adds a few tests that were missing.
|
Revision tags: llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, 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 |
|
#
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 ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3 |
|
#
dc129d6f |
| 05-Oct-2023 |
Anatolii Malibroda <54813212+antl-m@users.noreply.github.com> |
[libc++] Add std::fpclassify overloads for floating-point. (#67913)
Standard says that implementation of math functions that have
floating-point-type parameter should provide an "overload for each
[libc++] Add std::fpclassify overloads for floating-point. (#67913)
Standard says that implementation of math functions that have
floating-point-type parameter should provide an "overload for each
cv-unqualified floating-point type".
show more ...
|
Revision tags: 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 |
|
#
6553608a |
| 01-Aug-2023 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granulaize math.h and move the functions to std::__math
Reviewed By: #libc, Mordante
Spies: Mordante, arichardson, libcxx-commits
Differential Revision: https://reviews.llvm.org/D155258
|
Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, 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, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6 |
|
#
3b6bc875 |
| 24-Nov-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Remove Solaris related code
This was contributed ~10 years ago, but we don't officially support it and I am not aware of any bot testing it, so this has likely rotten to the point where it
[libc++] Remove Solaris related code
This was contributed ~10 years ago, but we don't officially support it and I am not aware of any bot testing it, so this has likely rotten to the point where it is unusable.
Differential Revision: https://reviews.llvm.org/D138680
show more ...
|
#
633927db |
| 25-Dec-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Add [[nodiscard]] extensions in <math.h>
There are quite a few functions marked `[[gnu::const]]` inside the compiler. This patch adds `[[nodiscard]]` to libc++-provided overloads of these f
[libc++] Add [[nodiscard]] extensions in <math.h>
There are quite a few functions marked `[[gnu::const]]` inside the compiler. This patch adds `[[nodiscard]]` to libc++-provided overloads of these functions to match the diagnostics produced.
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D140855
show more ...
|
#
7223bcf0 |
| 15-Dec-2022 |
Marek Kurdej <marek.kurdej+llvm.org@gmail.com> |
[libc++] [C++20] [P0415] Constexpr for std::complex.
This patch adds constexpr to <complex> header: operators, member operators, and member functions (real, imag, norm, conj).
https://eel.is/c++dra
[libc++] [C++20] [P0415] Constexpr for std::complex.
This patch adds constexpr to <complex> header: operators, member operators, and member functions (real, imag, norm, conj).
https://eel.is/c++draft/complex.numbers https://wg21.link/p0415
Reviewed By: ldionne, #libc
Spies: philnik, danilaml, Quuxplusone, wmaxey, arichardson, libcxx-commits
Differential Revision: https://reviews.llvm.org/D79555
show more ...
|
#
52bff450 |
| 18-Dec-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Implement constexpr {isfinite, isinf, isnan, isnormal}
This starts implementing P0533
Reviewed By: Mordante, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D
[libc++] Implement constexpr {isfinite, isinf, isnan, isnormal}
This starts implementing P0533
Reviewed By: Mordante, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D140277
show more ...
|
#
e0a66116 |
| 20-Dec-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize <type_traits> includes in <compare>
Reviewed By: Mordante, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D140480
|
Revision tags: llvmorg-15.0.5, llvmorg-15.0.4 |
|
#
928c81f3 |
| 01-Nov-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][math.h] Add double overloads
This allows libc++ to work with libcs that don't provide a proper math.h implementation.
Reviewed By: ldionne, #libc
Spies: aaron.ballman, fhahn, bcain, Izaro
[libc++][math.h] Add double overloads
This allows libc++ to work with libcs that don't provide a proper math.h implementation.
Reviewed By: ldionne, #libc
Spies: aaron.ballman, fhahn, bcain, Izaron, libcxx-commits
Differential Revision: https://reviews.llvm.org/D138629
show more ...
|
#
ba1e13d5 |
| 04-Nov-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][math.h] move #undefs to the top and guard explicitly against MSVCRT instead
Reviewed By: ldionne, #libc
Spies: #libc_vendors, EricWF, libcxx-commits
Differential Revision: https://reviews
[libc++][math.h] move #undefs to the top and guard explicitly against MSVCRT instead
Reviewed By: ldionne, #libc
Spies: #libc_vendors, EricWF, libcxx-commits
Differential Revision: https://reviews.llvm.org/D137502
show more ...
|
#
650da4a6 |
| 20-Oct-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][math.h] Use builtins for all the functions
This allows compiling libc++, even when the C library doesn't support floating point math.
Reviewed By: ldionne, #libc
Spies: daltenty, xingxue,
[libc++][math.h] Use builtins for all the functions
This allows compiling libc++, even when the C library doesn't support floating point math.
Reviewed By: ldionne, #libc
Spies: daltenty, xingxue, libcxx-commits, michaelplatings
Differential Revision: https://reviews.llvm.org/D136393
show more ...
|
#
b816b526 |
| 04-Nov-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][math.h][NFC] Refactor enable_ifs
Reviewed By: ldionne, Mordante, #libc
Spies: EricWF, libcxx-commits
Differential Revision: https://reviews.llvm.org/D137501
|
#
c7022647 |
| 04-Nov-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][math.h] Remove some code duplication
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D137500
|
#
b0a29f69 |
| 04-Nov-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][math.h] Remove __libcpp_<func> functions and instead call builtins directly
Reviewed By: ldionne, Mordante, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D13
[libc++][math.h] Remove __libcpp_<func> functions and instead call builtins directly
Reviewed By: ldionne, Mordante, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D137499
show more ...
|
#
40d8f878 |
| 04-Nov-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Assume that builtins for math.h functions are available
All supported compilers support the builtins, so this removes dead code and simplifies a lot of the functions through that.
Reviewed
[libc++] Assume that builtins for math.h functions are available
All supported compilers support the builtins, so this removes dead code and simplifies a lot of the functions through that.
Reviewed By: ldionne, #libc, EricWF
Spies: EricWF, michaelplatings, libcxx-commits
Differential Revision: https://reviews.llvm.org/D135781
show more ...
|
#
e1e1cad6 |
| 04-Nov-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][math.h][NFC] Reformat functions
This is just to make to follow-up diffs simpler
Reviewed By: ldionne, #libc, EricWF
Spies: EricWF, libcxx-commits
Differential Revision: https://reviews.l
[libc++][math.h][NFC] Reformat functions
This is just to make to follow-up diffs simpler
Reviewed By: ldionne, #libc, EricWF
Spies: EricWF, libcxx-commits
Differential Revision: https://reviews.llvm.org/D137498
show more ...
|
#
5d87f60f |
| 15-Nov-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Only include_next C library headers when they exist
Some platforms don't provide all C library headers. In practice, libc++ only requires a few C library headers to exist, and only a few fu
[libc++] Only include_next C library headers when they exist
Some platforms don't provide all C library headers. In practice, libc++ only requires a few C library headers to exist, and only a few functions on those headers. Missing functions that libc++ doesn't need for its own implementation are handled properly by the using_if_exists attribute, however a missing header is currently a hard error when we try to do #include_next.
This patch should make libc++ more flexible on platforms that do not provide C headers that libc++ doesn't actually require for its own implementation. The only downside is that it may move some errors from the #include_next point to later in the compilation if we actually try to use something that isn't provided, which could be somewhat confusing. However, these errors should be caught by folks trying to port libc++ over to a new platform (when running the libc++ test suite), not by end users.
NOTE: This is a reapplicaton of 226409, which was reverted in 674729813 because it broke the build. The issue has now been fixed with https://reviews.llvm.org/D138062.
Differential Revision: https://reviews.llvm.org/D136683
show more ...
|
#
67472981 |
| 15-Nov-2022 |
Nico Weber <thakis@chromium.org> |
Revert "[libc++] Only include_next C library headers when they exist"
This reverts commit 226409c62879bf5ff9928cd23a4255cd7c614fe0. Breaks check-clang on mac, see comments on https://reviews.llvm.or
Revert "[libc++] Only include_next C library headers when they exist"
This reverts commit 226409c62879bf5ff9928cd23a4255cd7c614fe0. Breaks check-clang on mac, see comments on https://reviews.llvm.org/D136683
show more ...
|
#
226409c6 |
| 25-Oct-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Only include_next C library headers when they exist
Some platforms don't provide all C library headers. In practice, libc++ only requires a few C library headers to exist, and only a few fu
[libc++] Only include_next C library headers when they exist
Some platforms don't provide all C library headers. In practice, libc++ only requires a few C library headers to exist, and only a few functions on those headers. Missing functions that libc++ doesn't need for its own implementation are handled properly by the using_if_exists attribute, however a missing header is currently a hard error when we try to do #include_next.
This patch should make libc++ more flexible on platforms that do not provide C headers that libc++ doesn't actually require for its own implementation. The only downside is that it may move some errors from the #include_next point to later in the compilation if we actually try to use something that isn't provided, which could be somewhat confusing. However, these errors should be caught by folks trying to port libc++ over to a new platform (when running the libc++ test suite), not by end users.
Differential Revision: https://reviews.llvm.org/D136683
show more ...
|
#
f7b8f727 |
| 27-Oct-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][math.h] Remove unnecessary uses of __promote
Removes __promote when it's just the identity.
Reviewed By: ldionne, #libc
Spies: libcxx-commits, michaelplatings
Differential Revision: http
[libc++][math.h] Remove unnecessary uses of __promote
Removes __promote when it's just the identity.
Reviewed By: ldionne, #libc
Spies: libcxx-commits, michaelplatings
Differential Revision: https://reviews.llvm.org/D136868
show more ...
|
Revision tags: llvmorg-15.0.3 |
|
#
ddeff232 |
| 12-Oct-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Remove __lcpp prefix in math.h
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D135774
|