[all-commits] [llvm/llvm-project] 002bfd: [clang][modules] Track affecting modules

Jan Svoboda via All-commits all-commits at lists.llvm.org
Wed Aug 24 11:10:07 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 002bfdd6b119e3543415971fbb219768fd96f86f
      https://github.com/llvm/llvm-project/commit/002bfdd6b119e3543415971fbb219768fd96f86f
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2022-08-24 (Wed, 24 Aug 2022)

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

  Log Message:
  -----------
  [clang][modules] Track affecting modules

When compiling a module, its semantics and Clang's behavior are affected by other modules. These modules are typically the **imported** ones. 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.

Reviewed By: benlangmuir

Differential Revision: https://reviews.llvm.org/D132430




More information about the All-commits mailing list