jansvoboda11 added inline comments.

================
Comment at: clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp:147
   const Module *TopLevelModule = Imported->getTopLevelModule();
-  MDC.ModularDeps[MDC.ContextHash + TopLevelModule->getFullModuleName()]
-      .ImportedByMainFile = true;
----------------
We don't know the context hash of the imported module just yet. Let's postpone 
its creation until `EndOfMainFile`, where we iterate over `DirectModularDeps` 
that also contains this module. We can also use its presence in 
`DirectModularDeps` to determine that it was imported by the main file.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102473/new/

https://reviews.llvm.org/D102473

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to