When a translation unit uses a PCH and imports the same modules as the PCH, we'd prefer to resolve to those modules instead of inventing new modules and reporting them as modular dependencies. Since the PCH modules have already been built nudge the compiler to reuse them when deciding whether to build a new module and don't report them as regular modular dependencies.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp | ||
---|---|---|
127 | I'd expect to have to do this recursively for each IMPORT in the PCH, since AST files list only direct imports. However, the AST file for PCH I use in tests contains imports of ModCommon1, ModCommon2, ModPCH even though only ModCommon1 and ModPCH are imported directly in the header. |
I'd expect to have to do this recursively for each IMPORT in the PCH, since AST files list only direct imports.
However, the AST file for PCH I use in tests contains imports of ModCommon1, ModCommon2, ModPCH even though only ModCommon1 and ModPCH are imported directly in the header.