[clang] [clang][deps] Add module map describing compiled module to file dependencies. (PR #160226)
Ben Langmuir via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 2 10:26:07 PDT 2025
================
@@ -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());
----------------
benlangmuir wrote:
All other file dependencies go through `addFileDep` which handles making the file path match the expected style (absolute, with native path separators). That's why you're seeing a relative modulemap path.
https://github.com/llvm/llvm-project/pull/160226
More information about the cfe-commits
mailing list