[all-commits] [llvm/llvm-project] 94e64d: [clang][modules] Consider M affecting after mappin...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Wed Aug 24 14:36:27 PDT 2022


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

  Changed paths:
    M clang/include/clang/Lex/Preprocessor.h
    M clang/lib/Frontend/CompilerInstance.cpp
    M clang/lib/Lex/PPDirectives.cpp
    A clang/test/ClangScanDeps/modules-implicit-dot-private.m
    M clang/test/Modules/implicit-map-dot-private.m

  Log Message:
  -----------
  [clang][modules] Consider M affecting after mapping M.Private to M_Private

When Clang encounters `@import M.Private` during implicit build, it precompiles module `M` and looks through its submodules. If the `Private` submodule is not found, Clang assumes `@import M_Private`. In the dependency scanner, we don't capture the dependency on `M`, since it's not imported. It's an affecting module, though: compilation of the import statement will fail when implicit modules are disabled and `M` is not precompiled and explicitly provided. This patch fixes that.

Depends on D132430.

Reviewed By: benlangmuir

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




More information about the All-commits mailing list