Skip to content

Commit 930915a

Browse files
authored
[libc++] Include the full set of libc++ transitive includes in the CSV files (#107911)
When we introduced the machinery for transitive includes validation, at some point we stopped including the full set of transitive includes in the CSV files and instead only tracked the set of public headers included *directly* by a top-level header. The reason for doing that was so that the CSV files containing "transitive" includes could be used to draw the dependency graph of libc++ headers. However, the downside was that it made the contents of the CSV files much harder to interpret. In particular, many changes that modify the CSV files do not in fact modify the effective set of transitive includes, which is confusing. This patch goes back to storing the full set of transitive includes in the CSV files and removes the ability to graph the libc++ includes directly from those CSV files, which we never actually used.
1 parent cb30169 commit 930915a

File tree

9 files changed

+9234
-92
lines changed

9 files changed

+9234
-92
lines changed

libcxx/test/libcxx/transitive_includes/cxx03.csv

Lines changed: 1597 additions & 10 deletions
Large diffs are not rendered by default.

libcxx/test/libcxx/transitive_includes/cxx11.csv

Lines changed: 1593 additions & 10 deletions
Large diffs are not rendered by default.

libcxx/test/libcxx/transitive_includes/cxx14.csv

Lines changed: 1643 additions & 10 deletions
Large diffs are not rendered by default.

libcxx/test/libcxx/transitive_includes/cxx17.csv

Lines changed: 1612 additions & 8 deletions
Large diffs are not rendered by default.

libcxx/test/libcxx/transitive_includes/cxx20.csv

Lines changed: 1593 additions & 0 deletions
Large diffs are not rendered by default.

libcxx/test/libcxx/transitive_includes/cxx23.csv

Lines changed: 596 additions & 0 deletions
Large diffs are not rendered by default.

libcxx/test/libcxx/transitive_includes/cxx26.csv

Lines changed: 596 additions & 0 deletions
Large diffs are not rendered by default.

libcxx/test/libcxx/transitive_includes_to_csv.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ def is_libcxx_header(header: str) -> bool:
6262

6363
def parse_file(file: pathlib.Path) -> List[str]:
6464
"""
65-
Parse a file containing --trace-include output to generate a list of the top-level C++ includes
65+
Parse a file containing --trace-includes output to generate a list of the top-level C++ includes
6666
contained in it.
6767
68-
This effectively generates the dependency graph of C++ Standard Library headers of the header
69-
whose --trace-include it is. In order to get the expected result of --trace-include, the
70-
-fshow-skipped-includes flag also needs to be passed.
68+
This effectively generates the list of public libc++ headers of the header whose --trace-includes it is.
69+
In order to get the expected result of --trace-includes, the -fshow-skipped-includes flag also needs to
70+
be passed.
7171
"""
7272
result = list()
7373
with file.open(encoding="utf-8") as f:
@@ -87,10 +87,6 @@ def parse_file(file: pathlib.Path) -> List[str]:
8787
result.append(header)
8888
continue
8989

90-
# Skip libc++ headers included transitively.
91-
if header.level > level:
92-
continue
93-
9490
# Detail headers are transparent too: we attribute all includes of public libc++
9591
# headers under a detail header to the last public libc++ header that included it.
9692
if header.name.startswith("__") or re.search(r"(/|\\\\)__", header.name):

libcxx/utils/graph_header_deps.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)