================
@@ -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;
----------------
cyndyishida wrote:

Thank you for checking this😅 

hm, so I definitely want to avoid querying for the visible modules for each 
transitive module dep, because what only matters is the "main" as you said, so 
I'm inclined to avoid adding the field to the ModuleDep object itself because 
it would be confusing when it's populated & when it's not.

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. 


https://github.com/llvm/llvm-project/pull/147969
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to