This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Simplify transitive includes test and fix a bug
ClosedPublic

Authored by ldionne on Sep 28 2022, 1:28 PM.

Details

Reviewers
Mordante
Group Reviewers
Restricted Project
Commits
rGc4ca3a2c4b00: [libc++] Simplify transitive includes test and fix a bug
Summary

This patch incorporates the "sanitize" step of the transitive includes
test into the CSV generator itself. In doing so, it removes complexity
in the test but also fixes a bug where we would filter out <__mutex>
from the output, leading to an incorrect list of includes for the
<shared_mutex> header.

Diff Detail

Event Timeline

ldionne created this revision.Sep 28 2022, 1:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2022, 1:28 PM
ldionne requested review of this revision.Sep 28 2022, 1:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2022, 1:28 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante accepted this revision.Sep 29 2022, 8:54 AM
Mordante added a subscriber: Mordante.

LGTM when the CI passes.

libcxx/test/libcxx/transitive_includes_to_csv.py
88
147

This seems duplicated from D134829.

This revision is now accepted and ready to land.Sep 29 2022, 8:54 AM
ldionne updated this revision to Diff 463991.Sep 29 2022, 12:11 PM
ldionne marked 2 inline comments as done.

Rebase onto main, address comments.

libcxx/test/libcxx/transitive_includes_to_csv.py
147

I actually moved it to inside parse_file, since IMO it made more sense to ensure that the output of parse_file itself had no duplicates.

ldionne updated this revision to Diff 464393.Sep 30 2022, 2:04 PM

Fix issue with sanitizers. The problem was that sanitizers cause additional headers to be included with -include, which broke the whole thing.

ldionne updated this revision to Diff 464741.Oct 3 2022, 10:56 AM

Try to address Clang-cl issue

This revision was landed with ongoing or failed builds.Oct 3 2022, 1:09 PM
This revision was automatically updated to reflect the committed changes.