// Iterate over all modules that 'File' is part of to find the best fit.
for (KnownHeader &H : Known->second) {
// Prefer a header from the current module over all others.
- if (H.getModule() == CompilingModule)
+ if (H.getModule()->getTopLevelModule() == CompilingModule)
return MakeResult(H);
// Cannot use a module if it is unavailable.
if (!H.getModule()->isAvailable())
-module a { header "a.h" header "x.h" }
-module b { header "b.h" header "x.h" }
+module a { module h { header "a.h" } module x { header "x.h" } }
+module b { module h { header "b.h" } module x { header "x.h" } }