[libcxx-commits] [libcxx] Revert "[libc++][modules] Rewrite the modulemap to have fewer top-level modules (#107638)" (PR #110384)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Sep 28 13:28:05 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r d3ca4844062411ae1b962e41636f3461d46a5b92...2a2212b10495fa9cdea9cf19756b0a50d61c5077 libcxx/utils/generate_std_clang_module_header.py libcxx/test/libcxx/clang_modules_include.gen.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- test/libcxx/clang_modules_include.gen.py 2024-09-28 20:21:52.000000 +0000
+++ test/libcxx/clang_modules_include.gen.py 2024-09-28 20:27:37.118746 +0000
@@ -18,11 +18,12 @@
import sys
sys.path.append(sys.argv[1])
from libcxx.header_information import lit_header_restrictions, public_headers
for header in public_headers:
- print(f"""\
+ print(
+ f"""\
//--- {header}.compile.pass.cpp
// RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only
// GCC doesn't support -fcxx-modules
// UNSUPPORTED: gcc
@@ -38,13 +39,15 @@
// UNSUPPORTED: LIBCXX-FREEBSD-FIXME
{lit_header_restrictions.get(header, '')}
#include <{header}>
-""")
+"""
+ )
-print(f"""\
+print(
+ f"""\
//--- __std_clang_module.compile.pass.mm
// RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only
// REQUIRES: clang-modules-build
@@ -61,6 +64,7 @@
// TODO: Investigate this failure
// UNSUPPORTED: LIBCXX-FREEBSD-FIXME
@import std;
-""")
+"""
+)
--- utils/generate_std_clang_module_header.py 2024-09-28 20:21:52.000000 +0000
+++ utils/generate_std_clang_module_header.py 2024-09-28 20:27:37.133245 +0000
@@ -51,11 +51,13 @@
"""
)
# Include the angle brackets in sorting so that <a.h> sorts before <a>
# like check-format wants.
- for include, header in sorted([(f"<{header}>", header) for header in libcxx.header_information.public_headers]):
+ for include, header in sorted(
+ [(f"<{header}>", header) for header in libcxx.header_information.public_headers]
+ ):
header_restriction = header_restrictions.get(header)
if header_restriction:
std_clang_module_header.write(f"#if {header_restriction}\n")
std_clang_module_header.write(f"# include {include}\n")
std_clang_module_header.write(f"#endif\n")
``````````
</details>
https://github.com/llvm/llvm-project/pull/110384
More information about the libcxx-commits
mailing list