================
@@ -249,9 +245,27 @@ GetAffectingModuleMaps(const Preprocessor &PP, Module 
*RootModule) {
 
     for (const auto &KH : HS.findResolvedModulesForHeader(*File))
       if (const Module *M = KH.getModule())
-        CollectIncludingMapsFromAncestors(M);
+        CollectModuleMapsForHierarchy(M);
   }
 
+  // FIXME: This algorithm is not correct for module map hierarchies where
----------------
benlangmuir wrote:

> Now, we will only walk the module hierarchy and only mark the defining 
> MSub2.modulemap and M.modulemap as affecting, effectively creating a "hole" 
> in the tree of module map file includes by omitting MSub1.modulemap.

Does this cause a failure when it tries to include MSub1.modulemap? In some 
sense this scenario could be "fine" since you have all the modulemaps that 
contributed to the module definition.

> However, cases like the following were broken before and will remain broken 
> with this patch:

Would being lazier about the module definitions solve this?

I'm not clear what the path to actually fixing these looks like

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

Reply via email to