[clang] [clang][scan-deps] Report a scanned TU's visible modules (PR #147969)

Artem Chikin via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 10 10:46:18 PDT 2025


================
@@ -57,6 +57,10 @@ struct TranslationUnitDeps {
   /// determined that the differences are benign for this compilation.
   std::vector<ModuleID> ClangModuleDeps;
 
+  /// A list of module names that are visible to this translation unit. This
+  /// includes both direct and transitive module dependencies.
+  std::vector<std::string> VisibleModules;
----------------
artemcm wrote:

FWIW, Swift does also use `DependencyScanningTool::getTranslationUnitDependencies` when scanning individual header files. 

https://github.com/llvm/llvm-project/pull/147969


More information about the cfe-commits mailing list