[PATCH] D102473: [clang][deps] Stop assuming the TU's context hash

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 14 05:04:50 PDT 2021


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



More information about the cfe-commits mailing list