Age | Commit message (Collapse) | Author | Files | Lines |
|
(cherry picked from commit bf5941afcda3ac6570ba25165758869287491e0d)
|
|
See https://reviews.llvm.org/D94718#2521489 for details.
(cherry picked from commit 90407b16b1d3e38f1360b6a24ceab801ab9cefc1)
|
|
Always turn on LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS, if libcxxrt is used
as the C++ ABI library, since libcxxrt does not provide the full set
ofnew and delete operators. In particular, the aligned versions of these
operators are completely missing. This primarily addresses builds on
FreeBSD, as this platform uses libcxxrt by default.
Also, attempt to provide a FreeBSD.cmake cache file, with hopefully sane
settings, partially copied from the Apple.cmake cache file. This needs
more work, probably some additions to ci build scripts (although I am
not aware of any 'official' FreeBSD build bots).
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D96720
(cherry picked from commit 328261019f50a76b11fa625739cbf32ceb2ce2f7)
|
|
defaults e.g. riscv32
Patch by Khem Raj.
(cherry pick of commit 85b9c5ccc172a1e61c7ecaaec4752587cb6f1e26)
Differential Revision: https://reviews.llvm.org/D96062
|
|
memory
Fixes usage of shared_ptr with CFI enabled, which is llvm.org/pr48993.
(cherry pick of commit bab74864168bb5e28ecbc0294fe1095d8da7f569)
Differential Revision: https://reviews.llvm.org/D96063
|
|
We do ship those headers, so the directory name should not be something
that can potentially conflict with user-defined directories.
This is a cherry-pick of b51756819a85563ae063e98eeb3d6af8e44c8f64.
Differential Revision: https://reviews.llvm.org/D96059
|
|
|
|
Split out of D93512.
|
|
|
|
Reviewed By: ldionne
Differential Revision: https://reviews.llvm.org/D94571
|
|
LWG reflector consensus is that this was a bug in libc++.
(In particular, MSVC also will fix it in their STL, soon.)
Bug originally discovered by Logan Smith.
Also fix `std::function<const void()>`, which should work
the same way as `std::function<void()>` in terms of allowing
"conversions" from non-void types.
Differential Revision: https://reviews.llvm.org/D94452
|
|
|
|
Differential Revision: https://reviews.llvm.org/D95372
|
|
After this patch, the only parts of P0879 that remain missing will be
std::nth_element, std::sort, and the heap/partial_sort algorithms.
Differential Revision: https://reviews.llvm.org/D93443
|
|
I believe this is a complete implementation of std::shift_left and std::shift_right from
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0769r2.pdf
Some test cases copied-with-modification from D60027.
Differential Revision: https://reviews.llvm.org/D93819
|
|
Updates the libc++ release notes with the changes since the last
release.
Differential Revision: https://reviews.llvm.org/D95248
|
|
Differential Revision: https://reviews.llvm.org/D92044
|
|
* This variable populates the default value of FOLDER target property. It is used in some IDE's (e.g. MSVC) to group different targets together.
|
|
Defining PATH_MAX to _XOPEN_PATH_MAX which is the closest macro available on z/OS.
Note that this value is 1024 which is 4 times smaller from same macro on Linux.
Reviewed By: #libc, ldionne, hubert.reinterpretcast
Differential Revision: https://reviews.llvm.org/D92110
|
|
During the review of D91986 it has been discovered the in C++11
deprecated `throw()` exception specification has been removed in
C++20. Removed the part of the test code using this feature.
|
|
Implements parts of:
- P0898R3 Standard Library Concepts
- P1754 Rename concepts to standard_case for C++20, while we still can
Reviewed By: ldionne, miscco, #libc
Differential Revision: https://reviews.llvm.org/D91004
|
|
It has the low-level bit fiddling operations from bit. It eliminates a cyclic dependency between __bit_reference, bits, and vector. I want to exploit this in later patches.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D94908
|
|
This is meant to unblock Chrome, as discussed in https://llvm.org/D74489.
Differential Revision: https://reviews.llvm.org/D95177
|
|
During the review of https://reviews.llvm.org/D93912 we failed to notice
the implementation status wasn't updated. This rectifies the issue.
|
|
|
|
local __libcpp_asprintf_l() -> libc asprintf() was inspecting the pointer (with
indeterminate value) for failure, rather than the return value of -1.
Reviewed By: ldionne
Differential Revision: https://reviews.llvm.org/D94564
|
|
Implemented the idea from D94571 to improve entropy on Linux.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D94953
|
|
Currently all these tests are XFAILED on Linux even though the problem
only seems to be with the few checks that look at collation. To retain
test coverage this splits the locale-dependent tests into a separate
.pass.cpp that is XFAILed as before.
This commit also XFAILs the locale-dependent tests on FreeBSD since the
[=M=] and [.ch.] behaviour for cs_CZ also doesn't seem to match the
behaviour that is expected by these tests.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D94969
|
|
C++23 string contains implementation and tests
Paper: https://wg21.link/P1679R3
Standard (string): https://eel.is/c++draft/string.contains
Standard (string_view): https://eel.is/c++draft/string.view.ops#lib:contains,basic_string_view
Differential Revision: https://reviews.llvm.org/D93912
|
|
Previously, LIBCXX_ENABLE_FILESYSTEM controlled only whether the filesystem
support was compiled into libc++'s library. This commit promotes the
setting to a first-class option like LIBCXX_ENABLE_LOCALIZATION, where
the whole library is aware of the setting and features that depend on
<filesystem> won't be provided at all. The test suite is also properly
annotated such that tests that depend on <filesystem> are disabled when
the library doesn't support it.
This is an alternative to https://llvm.org/D94824, but also an improvement
along the lines of LIBCXX_ENABLE_LOCALIZATION that I had been wanting to
make for a while.
Differential Revision: https://reviews.llvm.org/D94921
|
|
When the Debug mode is enabled, we disable extern declarations because we
don't want to use the functions compiled in the library, which might not
have had the debug mode enabled when built. However, some extern declarations
need to be kept, because code correctness depends on it.
31e820378b8a removed those declarations, which had the unintended
consequence of breaking the debug build. This commit fixes that by
re-introducing a separate macro for the required extern declarations,
and adds a comment so that we don't fall into that trap in the future.
Differential Revision: https://reviews.llvm.org/D94718
|
|
cmake_minimum_required(VERSION) calls cmake_policy(VERSION),
which sets all policies up to VERSION to NEW.
LLVM started requiring CMake 3.13 last year, so we can remove
a bunch of code setting policies prior to 3.13 to NEW as it
no longer has any effect.
Reviewed By: phosek, #libunwind, #libc, #libc_abi, ldionne
Differential Revision: https://reviews.llvm.org/D94374
|
|
Commit 5e416ba943b7c737deb8eca62756f7b4fa925845 (D71522) updated the
__config header but didn't change test_macros.h.
This fixes libcxx/language.support/has_timespec_get.compile.pass.cpp on
FreeBSD12/13.
Reviewed By: #libc, dim, ldionne
Differential Revision: https://reviews.llvm.org/D94292
|
|
constructors from the standard library.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0935r0.html
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D91292
|
|
Somehow commit 1f1250151f222ba391d05dcc173f4b6c65d05ca2 added the
right code but with the wrong whitespace.
|
|
The implementation had a lot of boilerplate and was more complicated than
necessary. This NFC refactoring introduces a few macros to reduce code
duplication, and uses a consistent style and formatting for the whole file.
Differential Revision: https://reviews.llvm.org/D94544
|
|
I've been playing a bit with the `generate_feature_test_macro_components.py` script and replaced some hardcoded values with extra code generation (generate ALL the things).
The output is the same and it makes updating the script less work for the coming 25 C++ standards (until 2 digit number overflow).
Feel free to 'veto' if you think it's overkill.
Differential Revision: https://reviews.llvm.org/D94530
|
|
Several subprojects have targets that do the same thing, and they all
follow the same naming convention: llvm-test-depends, clang-test-depends,
lld-test-depends, etc.
This makes libc++ consistent with other LLVM projects.
Thanks to Duncan Exon Smith for noticing and suggesting the change.
Differential Revision: https://reviews.llvm.org/D94499
|
|
Clang insists that __attribute__ attributes precede __declspec
attributes. This is a longstanding known issue:
https://llvm.org/pr24559. Re-order the visibility and deprecation macros
to fix the build.
Differential Revision: https://reviews.llvm.org/D94788
|
|
If mutex::try_lock() is called in a thread that already owns the mutex,
the behavior is undefined. The patch fixes the issue by creating another
thread, where the call is allowed.
Differential Revision: https://reviews.llvm.org/D94656
|
|
Contrary to the current visibility macro documentation, it appears that
gcc does handle visibility attribute on extern templates correctly, e.g.
https://godbolt.org/g/EejuV7. We need this so that extern template
instantiations of classes not marked _LIBCPP_TEMPLATE_VIS (e.g.
__vector_base_common) are correctly exported with gcc when building with
hidden visibility.
Reviewed By: ldionne
Differential Revision: https://reviews.llvm.org/D35388
|
|
As freq.QuadValue can be in the range of 10000000 to 19200000,
the multiplication before division makes the calculation overflow
and wrap to negative values every 16-30 minutes.
Instead count the whole seconds separately before adding the
scaled fractional seconds.
Add a testcase for steady_clock to check that the values returned for
now() compare as bigger than the zero time origin; this
corresponds to a testcase in Qt [1] [2] (that failed spuriously
due to this).
[1] https://bugreports.qt.io/browse/QTBUG-89539
[2] https://code.qt.io/cgit/qt/qtbase.git/tree/tests/auto/corelib/kernel/qdeadlinetimer/tst_qdeadlinetimer.cpp?id=f8de5e54022b8b7471131b7ad55c83b69b2684c0#n569
Differential Revision: https://reviews.llvm.org/D93456
|
|
Add initial OpenBSD support.
Reviewed By: ldionne
Differential Revision: https://reviews.llvm.org/D94205
|
|
Sometimes `_Compare` is an lvalue reference type, so letting it be
deduced is pretty much always wrong. (Well, less efficient than
it could be, anyway.)
Differential Revision: https://reviews.llvm.org/D93562
|
|
* https://wg21.link/p1048
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D94409
|
|
This adds `// clang-format off` in the auto-generated file to avoid lint warnings.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D94410
|
|
Differential Revision: https://reviews.llvm.org/D94343
|
|
To Do.
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0809r0.pdf
This issue/paper simply removed some library UB because vendors were
already doing the right thing. libc++ has always done the right thing
(in this respect).
Differential Revision: https://reviews.llvm.org/D93816
|
|
construction" as Complete.
The point of LWG2511 is basically just to make sure that we use
`tuple<Args&&...>` instead of `tuple<Args...>` in a couple of places
inside `scoped_allocator_adaptor` and inside `pair`.
As far as I can tell, this has been true for libc++
since EricWF's D27612 (and maybe even earlier than that).
|
|
I accidentally disabled this feature-test macro in my D93830,
due to a rebasing conflict. It had been enabled by my D93815,
and should have remained enabled.
|