return (BuildGlobalModuleIndex ||
(TheASTReader && TheASTReader->isGlobalIndexUnavailable() &&
getFrontendOpts().GenerateGlobalModuleIndex)) &&
- !ModuleBuildFailed;
+ !DisableGeneratingGlobalModuleIndex;
}
void CompilerInstance::setDiagnostics(DiagnosticsEngine *Value) {
// We can't find a module, error out here.
getDiagnostics().Report(ModuleNameLoc, diag::err_module_not_found)
<< ModuleName << SourceRange(ImportLoc, ModuleNameLoc);
- ModuleBuildFailed = true;
+ DisableGeneratingGlobalModuleIndex = true;
return nullptr;
}
if (ModuleFilename.empty()) {
getDiagnostics().Report(ModuleNameLoc, diag::err_module_build_disabled)
<< ModuleName;
- ModuleBuildFailed = true;
+ DisableGeneratingGlobalModuleIndex = true;
return nullptr;
}
if (*ModuleFile == M->getASTFile())
return M;
- ModuleBuildFailed = true;
+ DisableGeneratingGlobalModuleIndex = true;
getDiagnostics().Report(ModuleNameLoc, diag::err_module_prebuilt)
<< ModuleName;
return ModuleLoadResult();
LLVM_FALLTHROUGH;
case ASTReader::VersionMismatch:
case ASTReader::HadErrors:
- // FIXME: Should this set ModuleBuildFailed = true?
+ // FIXME: Should this set DisableGeneratingGlobalModuleIndex = true?
ModuleLoader::HadFatalFailure = true;
// FIXME: The ASTReader will already have complained, but can we shoehorn
// that diagnostic information into a more useful form?
return ModuleLoadResult();
case ASTReader::Failure:
- // FIXME: Should this set ModuleBuildFailed = true?
+ // FIXME: Should this set DisableGeneratingGlobalModuleIndex = true?
ModuleLoader::HadFatalFailure = true;
return ModuleLoadResult();
}
// We don't know the desired configuration for this module and don't
// necessarily even have a module map. Since ReadAST already produces
// diagnostics for these two cases, we simply error out here.
- ModuleBuildFailed = true;
+ DisableGeneratingGlobalModuleIndex = true;
return ModuleLoadResult();
}
getDiagnostics().Report(ModuleNameLoc, diag::err_module_cycle)
<< ModuleName << CyclePath;
- // FIXME: Should this set ModuleBuildFailed = true?
+ // FIXME: Should this set DisableGeneratingGlobalModuleIndex = true?
return nullptr;
}
getPreprocessorOpts().FailedModules->hasAlreadyFailed(ModuleName)) {
getDiagnostics().Report(ModuleNameLoc, diag::err_module_not_built)
<< ModuleName << SourceRange(ImportLoc, ModuleNameLoc);
- ModuleBuildFailed = true;
+ DisableGeneratingGlobalModuleIndex = true;
return nullptr;
}
"undiagnosed error in compileModuleAndReadAST");
if (getPreprocessorOpts().FailedModules)
getPreprocessorOpts().FailedModules->addFailed(ModuleName);
- ModuleBuildFailed = true;
+ DisableGeneratingGlobalModuleIndex = true;
return nullptr;
}
//if (Module == nullptr) {
// getDiagnostics().Report(ModuleNameLoc, diag::err_module_not_found)
// << ModuleName;
- // ModuleBuildFailed = true;
+ // DisableGeneratingGlobalModuleIndex = true;
// return ModuleLoadResult();
//}
MM.cacheModuleLoad(*Path[0].first, Module);
} else {
ModuleLoadResult Result = findOrCompileModuleAndReadAST(
ModuleName, ImportLoc, ModuleNameLoc, IsInclusionDirective);
- // FIXME: Can we pull 'ModuleBuildFailed = true' out of the return
- // sequences for findOrCompileModuleAndReadAST and do it here (as long as
- // the result is not a config mismatch)? See FIXMEs there.
+ // FIXME: Can we pull 'DisableGeneratingGlobalModuleIndex = true' out of
+ // the return sequences for findOrCompileModuleAndReadAST and do it here
+ // (as long as the result is not a config mismatch)? See FIXMEs there.
if (!Result.isNormal())
return Result;
Module = Result;