[clang][modules] Report module maps affecting `no_undeclared_includes` modules
authorJan Svoboda <jan_svoboda@apple.com>
Mon, 7 Mar 2022 09:22:06 +0000 (10:22 +0100)
committerJan Svoboda <jan_svoboda@apple.com>
Mon, 7 Mar 2022 09:47:46 +0000 (10:47 +0100)
commitb45888e959ad2d6562b8d321166e6387facdd412
treed5f735ab22bc9df332e550f03588237a2248181e
parent242b24c1849165bedb73fb14c8012d1d63ffd344
[clang][modules] Report module maps affecting `no_undeclared_includes` modules

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.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D120464
clang/include/clang/Basic/Module.h
clang/lib/Basic/Module.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/Modules/add-remove-irrelevant-module-map.m