This also updates the moved code to the current style. (i.e. _VSTD -> std, _LIBCPP_INLINE_VISIBILITY -> _LIBCPP_HIDE_FROM_ABI, clang-format).
Details
- Reviewers
ldionne Mordante EricWF - Group Reviewers
Restricted Project - Commits
- rGe655d8a54880: [libc++] Granularize __mutex_base
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I really dislike mixing granularizing patches with other changes. For the future please only do one change per patch.
I'm fine with only CI testing the followup changes and self-approving them. I don't feel it's needed to undo the changes for now.
I want to see it again to see the changes to the transitive includes.
libcxx/test/libcxx/transitive_includes/cxx2b.csv | ||
---|---|---|
120 | Merge conflicts |
I agree with @Mordante
These sorts of changes really muddy up the history, and are hard to review.
Hi. This change causes failures in one of our configurations, compiled with _LIBCPP_HAS_NO_THREADS. Compilation of mutex.cpp fails with the following error:
[2023-03-22T20:37:03.871Z] In file included from /workspace/workspace/armcompiler/next/toolchain/src/llvm-project/libcxx/src/mutex.cpp:11: [2023-03-22T20:37:03.871Z] In file included from /workspace/workspace/armcompiler/next/toolchain/build/libcxx_libcxxabi_libunwind/armv8.1m.main_hard_nofp_mve_armlibc/src/libcxx_libcxxabi_libunwind_armv8.1m.main_hard_nofp_mve_armlibc-build/include/c++/v1/mutex:192: [2023-03-22T20:37:03.871Z] /workspace/workspace/armcompiler/next/toolchain/build/libcxx_libcxxabi_libunwind/armv8.1m.main_hard_nofp_mve_armlibc/src/libcxx_libcxxabi_libunwind_armv8.1m.main_hard_nofp_mve_armlibc-build/include/c++/v1/__condition_variable/condition_variable.h:94:44: error: no template named 'is_floating_point'; did you mean 'std::is_floating_point'? [2023-03-22T20:37:03.871Z] inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<is_floating_point<_Rep>::value, chrono::nanoseconds> [2023-03-22T20:37:03.871Z] ^~~~~~~~~~~~~~~~~ [2023-03-22T20:37:03.871Z] std::is_floating_point
This happens because in the file __condition_variable/condition_variable.h, the _LIBCPP_BEGIN_NAMESPACE_STD line is guarded with #ifndef _LIBCPP_HAS_NO_THREADS so when the file is used with _LIBCPP_HAS_NO_THREADS the function __safe_nanosecond_cast gets defined in the global namespace (instead of std) from which is_floating_point is not accessible via unqualified lookup.
Could you please fix this issue?
Merge conflicts