[PATCH] D156563: [clang][deps] Remove `ModuleDeps::ImportedByMainFile`

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 28 11:45:55 PDT 2023


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

This information is already exposed via `TranslationUnitDeps::ClangModuleDeps` on the `DependencyScanningTool` level, and this patch also adds it on the `DependencyScanningWorker` level via `DependencyConsumer::handleDirectModuleDependency()`.

Besides being redundant, this bit of information is misleading for clients that share single `ModuleDeps` instance between multiple TUs (by using the `AlreadySeen` set). The module can be imported directly in some TUs but transitively in others.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156563

Files:
  clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
  clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h
  clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
  clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
  clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156563.545234.patch
Type: text/x-patch
Size: 6513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230728/44bc6560/attachment-0001.bin>


More information about the cfe-commits mailing list