Age | Commit message (Collapse) | Author | Files | Lines |
|
Reviewed By: ldionne, huixie90, #libc
Spies: EricWF, libcxx-commits, royjacobson
Differential Revision: https://reviews.llvm.org/D135016
|
|
Changes all unqualified calls to __throw_format_error to use a qualified
call.
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D140038
|
|
Some of those .compile.fail.cpp tests had become incorrect and they
were not testing anything. In general, .compile.fail.cpp tests are
bad because they make it way too easy to write garbage tests. Indeed,
the test could fail to compile due to any reason whatsoever (even a
typo) and it would appear to work correctly.
Differential Revision: https://reviews.llvm.org/D138731
|
|
Implement `std::expected` https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0323r12.html
Added tests
Differential Revision: https://reviews.llvm.org/D124516
address comment
|
|
|
|
Add a link to an in-progress patch.
|
|
Android devices frequently don't have enough memory to run this test.
e.g. On the API 33 x86-64 emulator with 2GiB RAM, the test triggers the
OOM Killer, the device reboots, and then `adb shell` exits with status
0 and no output.
Reviewed By: danalbert, #libc, Mordante
Differential Revision: https://reviews.llvm.org/D139502
|
|
The current Android headers don't appear to work with modules. We may
want to fix them eventually.
Reviewed By: #libc, Mordante
Differential Revision: https://reviews.llvm.org/D139498
|
|
This allows us to reuse workarounds for compilers that don't provide the builtins or constexpr support.
Reviewed By: ldionne, Mordante, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D139555
|
|
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
|
|
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D139273
|
|
We normally use the `__libcpp_` prefix to backport functions, but that doesn't really make sense here. The functions are always available. Using `__constexpr_` makes the intended use of the functions clear.
Reviewed By: Mordante, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D139521
|
|
Reviewed By: ldionne, #libc
Spies: LRFLEW, libcxx-commits, arichardson, krytarowski, jdoerfert
Differential Revision: https://reviews.llvm.org/D137739
|
|
This adds an incomplete version where the specializations for the
format_kinds are disabled dummy formatters.
Implements part of
- P2585R0 Improving default container formatting
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D137271
|
|
Bionic's sys/user.h declares a "struct user". The header tends to be
included, and when it is, it conflicts with "namespace user". Rename
user to User.
Differential Revision: https://reviews.llvm.org/D139380
|
|
The version used is now determined by Buildkite instead of using the
hard-coded version in the Docker image.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D139341
|
|
Fixes #58392
Reviewed By: ldionne, #libc
Spies: alexfh, hans, joanahalili, dblaikie, libcxx-commits
Differential Revision: https://reviews.llvm.org/D138601
|
|
This reverts commit bec8a372fc0db95852748691c0f4933044026b25.
This causes many of these errors to appear when rebuilding runtimes part
of fuchsia's toolchain:
ld.lld: error:
/usr/local/google/home/paulkirth/llvm-upstream/build/lib/x86_64-unknown-linux-gnu/libunwind.a(libunwind.cpp.o)
is incompatible with elf64-x86-64
This can be reproduced by making a complete toolchain, saving any source
file with no changes, then rerunning ninja distribution.
|
|
|
|
|
|
Bionic didn't add fopen64 until API 24, but there's no meaningful
distinction between them with Bionic, so just use fopen instead.
On Windows, use _chsize_s instead of _chsize. _chsize uses a 32-bit
`long` size argument, while _chsize_s uses __int64 instead.
Factor out utils::{off64_t, fopen64, ftruncate64} for use within the
create_file function.
Reviewed By: ldionne, #libc, mstorsjo
Differential Revision: https://reviews.llvm.org/D137132
|
|
instead
Reviewed By: ldionne, #libc
Spies: #libc_vendors, EricWF, libcxx-commits
Differential Revision: https://reviews.llvm.org/D137502
|
|
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
|
|
This is required to compile custom clang-tidy checks
Reviewed By: Mordante, #libc
Spies: libcxx-commits, arichardson
Differential Revision: https://reviews.llvm.org/D138728
|
|
Focus on the not-yet-implemented features: remove most details about the
already-implemented C++20 stuff, list out the major C++23 additions.
Differential Revision: https://reviews.llvm.org/D136657
|
|
Also add tests for the file.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D135635
|
|
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D137597
|
|
This bug was dicoved when implementing P2438R2.
Fixes #57190
Reviewed By: ldionne, Mordante, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D138069
|
|
This variable is derived from LLVM_DEFAULT_TARGET_TRIPLE by default,
but using a separate variable allows additional normalization to be
performed if needed.
Differential Revision: https://reviews.llvm.org/D137451
|
|
TEST_HAS_NO_WIDE_CHARACTERS should only be used in the tests.
Differential Revision: https://reviews.llvm.org/D138828
|
|
Differential Revision: https://reviews.llvm.org/D138801
|
|
Since we're checking preconditions for calling memmove, we might
as well do that properly.
Differential Revision: https://reviews.llvm.org/D138798
|
|
For consistency with the rest of the code base.
|
|
|
|
|
|
Note that we use <stddef.h> instead of <cstddef> because we're
using size_t (not std::size_t) and we're outside of namespace std.
Differential Revision: https://reviews.llvm.org/D138716
|
|
Differential Revision: https://reviews.llvm.org/D138687
|
|
|
|
Per our policy, the latest released AppleClang has been 14 for a while,
so libc++ is removing support for AppleClang 13. Our CI bots have been
moved to AppleClang 14 a few weeks ago.
Differential Revision: https://reviews.llvm.org/D138685
|
|
When we define the const-correct overloads of <string.h> functions in
libc++ itself, use builtins whenever possible. This avoids depending on
the presence of these functions in the C library headers.
Also, as a fly-by, improve the tests for these functions since we
basically didn't check anything but their signature. We could have
used the wrong builtin (as long as the signature matched) without ever
noticing, which was quite scary.
Differential Revision: https://reviews.llvm.org/D138684
|
|
This adds the AIX (i.e. Power) buildbot owners in the format established
by https://reviews.llvm.org/D138445
Reviewed By: ldionne
Differential Revision: https://reviews.llvm.org/D138580
|
|
This is in response to failures seen after landing D138307.
Differential Revision: https://reviews.llvm.org/D138596
|
|
The paper doesn't include anything affecting the library. AFAICT there isn't even anything to do for the compiler, since it just reserved the std attribute namespace.
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D138128
|
|
Reviewed By: ldionne, #libc
Spies: Eugene.Zelenko, aheejin, libcxx-commits, xazax.hun
Differential Revision: https://reviews.llvm.org/D137804
|
|
|
|
This patch removes the base template implementation for std::char_traits.
If my reading of http://eel.is/c++draft/char.traits is correct, the
Standard mandates that the library provides specializations for several
types like char and wchar_t, but not any implementation in the base
template. Indeed, such an implementation is bound to be incorrect for
most types anyways, since things like `eof()` and `int_type` will definitely
have to be customized.
Since the base template implementation should not have worked for anyone,
this shouldn't be a breaking change (I expect that anyone defining a
custom character type today will already have to provide their own
specialization of char_traits). However, since we're aware of some users
of char_traits for unsigned char and signed char, we're keeping those two
specializations around for two releases to give people some time to migrate.
Differential Revision: https://reviews.llvm.org/D138307
|
|
This makes the library consistent in how it handles C library headers. For C headers provided by libc++,
we unconditionally include <foo.h> from <cfoo>, and then <foo.h> conditionally include_next <foo.h>.
For headers not provided by libc++, <cfoo> conditionally includes the system's <foo.h> directly.
Differential Revision: https://reviews.llvm.org/D138512
|
|
construct
|
|
The ctype mask for newlib/picolibc is fully saturated, so __regex_word
has to overlap with one of the values. This commit uses the same workaround
as bionic did (uint16_t for char_class_type inside regex_traits). It
should be possible to have libc++ provide the default rune table instead,
but that will require a new mechanism to detect newlib inside __config
since the header defining the newlib/picolibc macros has not been included
yet inside __config. Doing it this way also avoids duplicating the ctype
table for newlib, reducing the global data size.
Differential Revision: https://reviews.llvm.org/D138195
|
|
Looks like std::conditional wasn't included in 14d4869209cc8ff9a53aaa5a59d6409fbc1c5f5d
(& maybe other typedefs that should be using this technique either got
missed or have regressed since that change was made)
This was noticed by a 1.4% clang.dwp regression due to
f4fb72e6d4cee1097e6606e66232fe55e793cd86 introducing more instantiations
of std::conditional - this change reduces that regression to 0.6% at
least.
I'm also looking at other instantiations caused by that change that
might be able to be addressed - but a quick grep shows ~200 "type"
typedefs missing _LIBCPP_NODEBUG, so maybe a systematic application of
the typedef might be suitable?
Differential Revision: https://reviews.llvm.org/D131082
|