manmanren added a comment. Thanks,
Manman ================ Comment at: lib/Frontend/CompilerInstance.cpp:1502 @@ +1501,3 @@ + Module = PP->getHeaderSearchInfo().lookupModule(ModuleName); + if (!Module) { + getDiagnostics().Report(ModuleNameLoc, diag::err_module_prebuilt) ---------------- Updated the patch to use error diagnostics instead of assertion. <<< It'd also be good to check that Module->ASTFile actually refers to the file that we found in the prebuilt module path, and not (say) to one of its transitive dependencies that ReadAST also loaded. Did we already check this when creating the module in ASTReader? if (!ParentModule) { if (const FileEntry *CurFile = CurrentModule->getASTFile()) { if (CurFile != F.File) { ... } } CurrentModule->setASTFile(F.File); } https://reviews.llvm.org/D23125 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits