[llvm-branch-commits] [libcxx] edc0ee3 - [libc++][modules] Fixes exporting named declarations.
Tobias Hieta via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 8 03:48:41 PDT 2023
Author: Mark de Wever
Date: 2023-08-08T12:47:27+02:00
New Revision: edc0ee3ccad416ab186202bf928ea64e3a7987b7
URL: https://github.com/llvm/llvm-project/commit/edc0ee3ccad416ab186202bf928ea64e3a7987b7
DIFF: https://github.com/llvm/llvm-project/commit/edc0ee3ccad416ab186202bf928ea64e3a7987b7.diff
LOG: [libc++][modules] Fixes exporting named declarations.
@ChuanqiXu noticed std::atomic was not properly exported in the std module.
Investigation showed other named declarations were not exported either. This
fixes the issue.
Depends on D156550
Reviewed By: #libc, philnik
Differential Revision: https://reviews.llvm.org/D156592
(cherry picked from commit e57f6f709ed2ebef7852bebb47baaf202962b4ee)
Added:
Modified:
libcxx/modules/std/atomic.cppm
libcxx/modules/std/execution.cppm
libcxx/modules/std/filesystem.cppm
Removed:
################################################################################
diff --git a/libcxx/modules/std/atomic.cppm b/libcxx/modules/std/atomic.cppm
index 9c1948494bd4ab..faf902b768d750 100644
--- a/libcxx/modules/std/atomic.cppm
+++ b/libcxx/modules/std/atomic.cppm
@@ -23,9 +23,6 @@ export namespace std {
using std::memory_order_seq_cst;
using std::kill_dependency;
-} // namespace std
-
-namespace std {
// [atomics.ref.generic], class template atomic_ref
// [atomics.ref.pointer], partial specialization for pointers
diff --git a/libcxx/modules/std/execution.cppm b/libcxx/modules/std/execution.cppm
index 6ea12c0dc4ee45..e0996f33d41523 100644
--- a/libcxx/modules/std/execution.cppm
+++ b/libcxx/modules/std/execution.cppm
@@ -17,7 +17,7 @@ export namespace std {
using std::is_execution_policy_v;
} // namespace std
-namespace std::execution {
+export namespace std::execution {
// [execpol.seq], sequenced execution policy
using std::execution::sequenced_policy;
diff --git a/libcxx/modules/std/filesystem.cppm b/libcxx/modules/std/filesystem.cppm
index ea8136b4ef9fcf..c6dac368a1cd58 100644
--- a/libcxx/modules/std/filesystem.cppm
+++ b/libcxx/modules/std/filesystem.cppm
@@ -110,11 +110,11 @@ export namespace std::filesystem {
} // namespace std::filesystem
// [fs.path.hash], hash support
-namespace std {
+export namespace std {
using std::hash;
}
-namespace std::ranges {
+export namespace std::ranges {
using std::ranges::enable_borrowed_range;
using std::ranges::enable_view;
} // namespace std::ranges
More information about the llvm-branch-commits
mailing list