Skip to content

Commit f9a8c46

Browse files
committed
git squash commit for update_libcxx_imp.
e0c4b64 git squash commit for update_libcxx_imp. 3971b55 add top level headers starting from __ in libcxx.imp 3dcc3b7 underscore 0ac78d7 fmt
1 parent e5f9de8 commit f9a8c46

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

libcxx/utils/libcxx/header_information.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,25 +192,27 @@ def is_modulemap_header(header):
192192
assert libcxx_root.exists()
193193

194194
all_headers = sorted(
195-
p.relative_to(include).as_posix() for p in include.rglob("[a-z]*") if is_header(p)
195+
p.relative_to(include).as_posix() for p in include.rglob("[_a-z]*") if is_header(p)
196196
)
197197
toplevel_headers = sorted(
198-
p.relative_to(include).as_posix() for p in include.glob("[a-z]*") if is_header(p)
198+
p.relative_to(include).as_posix() for p in include.glob("[_a-z]*") if is_header(p)
199199
)
200200
experimental_headers = sorted(
201201
p.relative_to(include).as_posix()
202202
for p in include.glob("experimental/[a-z]*")
203203
if is_header(p)
204204
)
205-
public_headers = toplevel_headers + experimental_headers
205+
public_headers = list(
206+
filter(lambda x: not x.startswith("__"), toplevel_headers + experimental_headers)
207+
)
206208

207209
# The headers used in the std and std.compat modules.
208210
#
209211
# This is the set of all C++23-and-later headers, excluding C compatibility headers.
210212
module_headers = [
211213
header
212214
for header in toplevel_headers
213-
if not header.endswith(".h")
215+
if not header.endswith(".h") and not header.startswith("__")
214216
# These headers have been removed in C++20 so are never part of a module.
215217
and not header in ["ccomplex", "ciso646", "cstdbool", "ctgmath"]
216218
]

0 commit comments

Comments
 (0)