File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
lib/Tooling/DependencyScanning Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -448,11 +448,9 @@ void ModuleDepCollector::applyDiscoveredDependencies(CompilerInvocation &CI) {
448448 if (OptionalFileEntryRef CurrentModuleMap =
449449 PP.getHeaderSearchInfo ()
450450 .getModuleMap ()
451- .getModuleMapFileForUniquing (CurrentModule)) {
451+ .getModuleMapFileForUniquing (CurrentModule))
452452 CI.getFrontendOpts ().ModuleMapFiles .emplace_back (
453453 CurrentModuleMap->getNameAsRequested ());
454- Consumer.handleFileDependency (CurrentModuleMap->getNameAsRequested ());
455- }
456454
457455 SmallVector<ModuleID> DirectDeps;
458456 for (const auto &KV : ModularDeps)
@@ -687,6 +685,13 @@ void ModuleDepCollectorPP::EndOfMainFile() {
687685 if (!MDC.ScanInstance .getPreprocessorOpts ().ImplicitPCHInclude .empty ())
688686 MDC.addFileDep (MDC.ScanInstance .getPreprocessorOpts ().ImplicitPCHInclude );
689687
688+ if (Module *CurrentModule = PP.getCurrentModuleImplementation ()) {
689+ if (OptionalFileEntryRef CurrentModuleMap =
690+ PP.getHeaderSearchInfo ().getModuleMap ().getModuleMapFileForUniquing (
691+ CurrentModule))
692+ MDC.addFileDep (CurrentModuleMap->getNameAsRequested ());
693+ }
694+
690695 for (const Module *M :
691696 MDC.ScanInstance .getPreprocessor ().getAffectingClangModules ())
692697 if (!MDC.isPrebuiltModule (M))
Original file line number Diff line number Diff line change 4747// CHECK-NEXT: "[[PREFIX]]/modules-fmodule-name-no-module-built.m",
4848// CHECK-NEXT: "[[PREFIX]]/Inputs/header3.h",
4949// CHECK-NEXT: "[[PREFIX]]/Inputs/header.h",
50- // CHECK-NEXT: "Inputs/module.modulemap"
50+ // CHECK-NEXT: "[[PREFIX]]/ Inputs/module.modulemap"
5151// CHECK-NEXT: ],
5252// CHECK-NEXT: "input-file": "[[PREFIX]]/modules-fmodule-name-no-module-built.m"
5353// CHECK-NEXT: }
You can’t perform that action at this time.
0 commit comments