[all-commits] [llvm/llvm-project] ddb6c2: [libc++] Rewrites graph_header_deps.py.
mordante via All-commits
all-commits at lists.llvm.org
Sun Sep 25 06:06:38 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ddb6c2b301f60c8d5a80d984554b93590cc4bc76
https://github.com/llvm/llvm-project/commit/ddb6c2b301f60c8d5a80d984554b93590cc4bc76
Author: Mark de Wever <koraq at xs4all.nl>
Date: 2022-09-25 (Sun, 25 Sep 2022)
Changed paths:
M libcxx/docs/DesignDocs/HeaderRemovalPolicy.rst
M libcxx/include/algorithm
M libcxx/include/any
M libcxx/include/atomic
M libcxx/include/future
M libcxx/include/optional
M libcxx/include/thread
M libcxx/utils/ci/run-buildbot
M libcxx/utils/graph_header_deps.py
Log Message:
-----------
[libc++] Rewrites graph_header_deps.py.
The new version is a lot simpler and has less option which were not
used. This uses the CSV files as generated by D133127 as input data.
The current Python script has more features but uses a simple "grep"
making the output less accurate:
- Conditionally included header are always included. This is an issue
since part of our includes are unneeded transitive includes. Based on
the language version they may be omitted. The script however always
includes them.
- Includes in comments are processed as-if they are includes. This is an
issue when comments explain how certain data is generated; of course
there are digraphs which the script omits.
This implementation uses Clang's --trace-includes to generate the includes
per header. This means the input of the generation script always has the
real list of includes.
Libc++ is moving from large monolithic Standard headers to more fine
grained headers. For example, algorithm includes every header in
`__algorithm`. Adding all these detail headers in the graph makes the
output unusable. Instead it only shows the Standard headers. The
transitive includes of the detail headers are parsed and "attributed" to
the Standard header including them. This gives an accurate include graph
without the unneeded clutter. Note that this graph is still big.
This changes fixes the cyclic dependency issue with the previous version
of the tool so the markers and its documentation is removed.
Since the input has no cycles the CI test is removed.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D134188
More information about the All-commits
mailing list