================
@@ -1988,6 +1988,23 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
// * `Preprocessor::HandleHeaderIncludeOrImport` will never call this
// function as the `#include` or `#import` is textual.
+ MM.cacheModuleLoad(*Path[0].getIdentifierInfo(), Module);
+ } else if (getPreprocessorOpts().SingleModuleParseMode) {
+ // This mimics how findOrCompileModuleAndReadAST() finds the module.
+ Module = getPreprocessor().getHeaderSearchInfo().lookupModule(
+ ModuleName, ImportLoc, true, !IsInclusionDirective);
+ if (Module) {
+ // Mark the module and its submodules as if they were loaded from a PCM.
+ // This prevents emission of the "missing submodule" diagnostic below.
+ std::vector Worklist{Module};
----------------
abhishek-kaushik22 wrote:
Thanks :)
https://github.com/llvm/llvm-project/pull/179610
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits