diff options
author | dim <dim@FreeBSD.org> | 2015-12-30 13:34:49 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-30 13:34:49 +0000 |
commit | 63b24cc778504ffd19e4c30a730e574c346312ee (patch) | |
tree | 28726ef2038e86121e353aabf52297b35a48efa2 /contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp | |
parent | 9b5bf5c4f53d65d6a48722d7410ed7cb15f5ba3a (diff) | |
parent | 3176e97f130184ece0e1a21352c8124cc83ff24a (diff) | |
download | FreeBSD-src-63b24cc778504ffd19e4c30a730e574c346312ee.zip FreeBSD-src-63b24cc778504ffd19e4c30a730e574c346312ee.tar.gz |
Update clang to trunk r256633.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp b/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp index 3e0f7a1..ecef92e 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp +++ b/contrib/llvm/tools/clang/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; |