================
@@ -444,9 +444,11 @@ void
ModuleDepCollector::applyDiscoveredDependencies(CompilerInvocation &CI) {
if (OptionalFileEntryRef CurrentModuleMap =
PP.getHeaderSearchInfo()
.getModuleMap()
- .getModuleMapFileForUniquing(CurrentModule))
+ .getModuleMapFileForUniquing(CurrentModule)) {
CI.getFrontendOpts().ModuleMapFiles.emplace_back(
CurrentModuleMap->getNameAsRequested());
+ Consumer.handleFileDependency(CurrentModuleMap->getNameAsRequested());
----------------
jansvoboda11 wrote:
I think this should be just `->getName()` - the build system won't know how to
map between the as-requested path and the on-disk path.
I'd also prefer if we did this in `ModuleDepCollectorPP::EndOfMainFile()`. This
function should just modify the `CI` with the information collected so far, not
perform more logic and reporting. It may also get called multiple times for a
driver command, and re-invoking the `Consumer` doesn't make sense IMO.
https://github.com/llvm/llvm-project/pull/160226
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits