[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 11:12:13 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:

> I think the easiest solution would be to change the return type, since the only significant difference AFAICT between those APIs is `getModuleDependencies` just creates an implicit buffer to be able to treat the request like a TU.

Agreed, thanks! 

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


More information about the cfe-commits mailing list