[libcxx-commits] [libcxx] [libc++] Add some private headers to libcxx.imp (PR #89568)

Takuto Ikuta via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 23 01:27:39 PDT 2024


================
@@ -192,25 +192,27 @@ def is_modulemap_header(header):
 assert libcxx_root.exists()
 
 all_headers = sorted(
-    p.relative_to(include).as_posix() for p in include.rglob("[a-z]*") if is_header(p)
+    p.relative_to(include).as_posix() for p in include.rglob("[_a-z]*") if is_header(p)
 )
 toplevel_headers = sorted(
-    p.relative_to(include).as_posix() for p in include.glob("[a-z]*") if is_header(p)
+    p.relative_to(include).as_posix() for p in include.glob("[_a-z]*") if is_header(p)
 )
 experimental_headers = sorted(
     p.relative_to(include).as_posix()
     for p in include.glob("experimental/[a-z]*")
     if is_header(p)
 )
-public_headers = toplevel_headers + experimental_headers
+public_headers = list(
+    filter(lambda x: not x.startswith("__"), toplevel_headers + experimental_headers)
+)
 
 # The headers used in the std and std.compat modules.
 #
 # This is the set of all C++23-and-later headers, excluding C compatibility headers.
 module_headers = [
     header
     for header in toplevel_headers
-    if not header.endswith(".h")
+    if not header.endswith(".h") and not header.startswith("__")
----------------
atetubou wrote:

Done.

https://github.com/llvm/llvm-project/pull/89568


More information about the libcxx-commits mailing list