[all-commits] [llvm/llvm-project] 242b24: [clang][modules] NFC: Simplify and clarify test

Jan Svoboda via All-commits all-commits at lists.llvm.org
Mon Mar 7 01:48:00 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 242b24c1849165bedb73fb14c8012d1d63ffd344
      https://github.com/llvm/llvm-project/commit/242b24c1849165bedb73fb14c8012d1d63ffd344
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2022-03-07 (Mon, 07 Mar 2022)

  Changed paths:
    R clang/test/Modules/Inputs/AddRemoveIrrelevantModuleMap/a.modulemap
    R clang/test/Modules/Inputs/AddRemoveIrrelevantModuleMap/b.modulemap
    M clang/test/Modules/add-remove-irrelevant-module-map.m

  Log Message:
  -----------
  [clang][modules] NFC: Simplify and clarify test

This patch simplifies a test that checks only used module map files are reported as input files in PCM files.

Instead of using opaque `diff`, this patch uses `clang -module-file-info` and `FileCheck` to verify this.

Reviewed By: dexonsmith

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


  Commit: b45888e959ad2d6562b8d321166e6387facdd412
      https://github.com/llvm/llvm-project/commit/b45888e959ad2d6562b8d321166e6387facdd412
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2022-03-07 (Mon, 07 Mar 2022)

  Changed paths:
    M clang/include/clang/Basic/Module.h
    M clang/lib/Basic/Module.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/test/Modules/add-remove-irrelevant-module-map.m

  Log Message:
  -----------
  [clang][modules] Report module maps affecting `no_undeclared_includes` modules

Since D106876, PCM files don't report module maps as input files unless they contributed to the compilation.

Reporting only module maps of (transitively) imported modules is not enough, though. For modules marked with `[no_undeclared_includes]`, other module maps affect the compilation by introducing anti-dependencies.

This patch makes sure such module maps are being reported as input files.

Depends on D120463.

Reviewed By: dexonsmith

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


Compare: https://github.com/llvm/llvm-project/compare/d9633d149022...b45888e959ad


More information about the All-commits mailing list