File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,10 @@ def is_header(file):
161
161
]
162
162
163
163
164
+ def is_public_header (header ):
165
+ return not header .startswith ("__" )
166
+
167
+
164
168
def is_modulemap_header (header ):
165
169
"""Returns whether a header should be listed in the modulemap"""
166
170
# TODO: Should `__config_site` be in the modulemap?
@@ -202,17 +206,16 @@ def is_modulemap_header(header):
202
206
for p in include .glob ("experimental/[a-z]*" )
203
207
if is_header (p )
204
208
)
205
- public_headers = list (
206
- filter (lambda x : not x .startswith ("__" ), toplevel_headers + experimental_headers )
207
- )
209
+
210
+ public_headers = [p for p in all_headers if is_public_header (p )]
208
211
209
212
# The headers used in the std and std.compat modules.
210
213
#
211
214
# This is the set of all C++23-and-later headers, excluding C compatibility headers.
212
215
module_headers = [
213
216
header
214
217
for header in toplevel_headers
215
- if not header .endswith (".h" ) and not header . startswith ( "__" )
218
+ if not header .endswith (".h" ) and is_public_header ( header )
216
219
# These headers have been removed in C++20 so are never part of a module.
217
220
and not header in ["ccomplex" , "ciso646" , "cstdbool" , "ctgmath" ]
218
221
]
You can’t perform that action at this time.
0 commit comments