This is an archive of the discontinued LLVM Phabricator instance.

[clang][modules] Report module maps affecting `no_undeclared_includes` modules
ClosedPublic

Authored by jansvoboda11 on Feb 24 2022, 1:40 AM.

Details

Summary

Since D106876, PCM files don't report module maps as input files unless they contributed to the compilation.

Reporting only module maps of (transitively) imported modules is not enough, though. For modules marked with [no_undeclared_includes], other module maps affect the compilation by introducing anti-dependencies.

This patch makes sure such module maps are being reported as input files.

Depends on D120463.

Diff Detail

Event Timeline

jansvoboda11 requested review of this revision.Feb 24 2022, 1:40 AM
jansvoboda11 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 24 2022, 1:40 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dexonsmith accepted this revision.Mar 1 2022, 4:51 PM

LGTM, with one test suggestion.

clang/test/Modules/add-remove-irrelevant-module-map.m
36–38

Would it be useful to also add a #error or similar inside the #if?

This revision is now accepted and ready to land.Mar 1 2022, 4:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2022, 4:51 PM
jansvoboda11 added inline comments.Mar 2 2022, 6:45 AM
clang/test/Modules/add-remove-irrelevant-module-map.m
36–38

Yes, that makes sense. I'll add it before comitting.

This revision was landed with ongoing or failed builds.Mar 7 2022, 1:48 AM
This revision was automatically updated to reflect the committed changes.
Orlando added a subscriber: Orlando.Mar 7 2022, 2:31 AM

Hi, the test add-remove-irrelevant-module-map.m starts failing with this commit on the llvm-clang-x86_64-sie-win builder: https://lab.llvm.org/buildbot/#/builders/216/builds/929. Please can you take a look when you get the chance?

Hi, the test add-remove-irrelevant-module-map.m starts failing with this commit on the llvm-clang-x86_64-sie-win builder: https://lab.llvm.org/buildbot/#/builders/216/builds/929. Please can you take a look when you get the chance?

Hi, it's already fixed in https://lab.llvm.org/buildbot/#/builders/216/builds/932.

Hi, the test add-remove-irrelevant-module-map.m starts failing with this commit on the llvm-clang-x86_64-sie-win builder: https://lab.llvm.org/buildbot/#/builders/216/builds/929. Please can you take a look when you get the chance?

Hi, it's already fixed in https://lab.llvm.org/buildbot/#/builders/216/builds/932.

Aha, sorry for the noise, thanks!