[PATCH] D132430: [clang][modules] Track affecting modules

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 22 19:03:23 PDT 2022


jansvoboda11 created this revision.
jansvoboda11 added reviewers: benlangmuir, Bigcheese.
Herald added a project: All.
jansvoboda11 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

When compiling a module, its semantics and Clang's behavior is affected by other modules. These are typically the **imported** modules. However, during implicit build, some modules end up being compiled and read without being actually imported. This patch starts tracking such modules and serializing them into `.pcm` files. This enables the dependency scanner to construct explicit compilations that mimic implicit build.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132430

Files:
  clang/include/clang/Basic/Module.h
  clang/include/clang/Lex/ModuleLoader.h
  clang/include/clang/Lex/Preprocessor.h
  clang/include/clang/Serialization/ASTBitCodes.h
  clang/include/clang/Serialization/ASTReader.h
  clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
  clang/lib/Frontend/CompilerInstance.cpp
  clang/lib/Lex/HeaderSearch.cpp
  clang/lib/Lex/PPDirectives.cpp
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTWriter.cpp
  clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
  clang/test/ClangScanDeps/modules-incomplete-umbrella.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132430.454673.patch
Type: text/x-patch
Size: 19758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220823/0adfe534/attachment-0001.bin>


More information about the cfe-commits mailing list