diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:49:41 +0000 |
commit | 45b533945f0851ec234ca846e1af5ee1e4df0b6e (patch) | |
tree | 0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /lib/Frontend/FrontendAction.cpp | |
parent | 7e86edd64bfae4e324224452e4ea879b3371a4bd (diff) |
Notes
Diffstat (limited to 'lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | lib/Frontend/FrontendAction.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index 3e0f7a12c3b3..ecef92e0a7dd 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -190,9 +190,9 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, IntrusiveRefCntPtr<DiagnosticsEngine> Diags(&CI.getDiagnostics()); - std::unique_ptr<ASTUnit> AST = - ASTUnit::LoadFromASTFile(InputFile, CI.getPCHContainerReader(), - Diags, CI.getFileSystemOpts()); + std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromASTFile( + InputFile, CI.getPCHContainerReader(), Diags, CI.getFileSystemOpts(), + CI.getCodeGenOpts().DebugTypeExtRefs); if (!AST) goto failure; @@ -284,7 +284,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, if (!Found) { CI.getDiagnostics().Report(diag::err_fe_no_pch_in_dir) << PCHInclude; - return true; + goto failure; } } } @@ -375,7 +375,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, if (CI.getLangOpts().Modules) CI.createModuleManager(); - PP.getBuiltinInfo().InitializeBuiltins(PP.getIdentifierTable(), + PP.getBuiltinInfo().initializeBuiltins(PP.getIdentifierTable(), PP.getLangOpts()); } else { // FIXME: If this is a problem, recover from it by creating a multiplex @@ -442,9 +442,11 @@ bool FrontendAction::Execute() { // there were any module-build failures. if (CI.shouldBuildGlobalModuleIndex() && CI.hasFileManager() && CI.hasPreprocessor()) { - GlobalModuleIndex::writeIndex( - CI.getFileManager(), CI.getPCHContainerReader(), - CI.getPreprocessor().getHeaderSearchInfo().getModuleCachePath()); + StringRef Cache = + CI.getPreprocessor().getHeaderSearchInfo().getModuleCachePath(); + if (!Cache.empty()) + GlobalModuleIndex::writeIndex(CI.getFileManager(), + CI.getPCHContainerReader(), Cache); } return true; |