================ @@ -161,8 +161,13 @@ static TypeCode getTypeCodeForTypeClass(Type::TypeClass id) { namespace { -std::set<const FileEntry *> GetAffectingModuleMaps(const Preprocessor &PP, - Module *RootModule) { +std::optional<std::set<const FileEntry *>> +GetAffectingModuleMaps(const Preprocessor &PP, Module *RootModule) { + // Without implicit module map search, there's no good reason to know about + // any module maps that are not affecting. + if (!PP.getHeaderSearchInfo().getHeaderSearchOpts().ImplicitModuleMaps) + return std::nullopt; ---------------- zygoloid wrote:
I don't think this is correct -- we can know about non-affecting module map files because they were specified on the command line using `-fmodule-map-file=` and either weren't actually used or (as happens in our case) we got the same information from a PCM file and so didn't need the module map file. I think this check is a regression; can it be removed? https://github.com/llvm/llvm-project/pull/87849 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits