[all-commits] [llvm/llvm-project] 246166: [clang][deps] NFC: Remove redundant CompilerInstan...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Thu Oct 21 05:00:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 24616664afd455d7fde9cf4c631ff30347196bbc
      https://github.com/llvm/llvm-project/commit/24616664afd455d7fde9cf4c631ff30347196bbc
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2021-10-21 (Thu, 21 Oct 2021)

  Changed paths:
    M clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
    M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp

  Log Message:
  -----------
  [clang][deps] NFC: Remove redundant CompilerInstance reference

The `ModuleDepCollectorPP` class holds a reference to `ModuleDepCollector` as well as `ModuleDepCollector`'s `CompilerInstance`. The fact that these refer to the same object is non-obvious.

This patch removes the `CompilerInvocation` reference from `ModuleDepCollectorPP` and accesses it through `ModuleDepCollector` instead.

Reviewed By: dexonsmith

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


  Commit: 207e9fdea704dd8c6db077971d958abb8b4d6d84
      https://github.com/llvm/llvm-project/commit/207e9fdea704dd8c6db077971d958abb8b4d6d84
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2021-10-21 (Thu, 21 Oct 2021)

  Changed paths:
    M clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
    M clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
    M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp

  Log Message:
  -----------
  [clang][deps] NFC: Rename scanning CompilerInstance

The dependency scanner works with multiple instances of `Compiler{Instance,Invocation}`. From names of the variables/members, their purpose is not obvious.

This patch gives a distinct name to the `CompilerInstance` that's used to run the implicit build during dependency scan.

Depends on D111724.

Reviewed By: dexonsmith

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


  Commit: c62220f9623dde699b88baf47c0a3dca400767fb
      https://github.com/llvm/llvm-project/commit/c62220f9623dde699b88baf47c0a3dca400767fb
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2021-10-21 (Thu, 21 Oct 2021)

  Changed paths:
    M clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
    M clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
    M clang/tools/clang-scan-deps/ClangScanDeps.cpp

  Log Message:
  -----------
  [clang][deps] NFC: Rename building CompilerInvocation

The dependency scanner works with multiple instances of `Compiler{Instance,Invocation}`. From names of the variables/members, their purpose is not obvious.

This patch gives descriptive name to the generated `CompilerInvocation` that can be used to derive the command-line to build a modular dependency.

Depends on D111725.

Reviewed By: dexonsmith

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


Compare: https://github.com/llvm/llvm-project/compare/954d77b98dd6...c62220f9623d


More information about the All-commits mailing list