diff options
Diffstat (limited to 'lib/Frontend/FrontendAction.cpp')
-rw-r--r-- | lib/Frontend/FrontendAction.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index 91c946c9cf25..96a68c931e1f 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -46,11 +46,9 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI, assert(hasASTSupport() && "This action does not have AST support!"); std::string Error; - ASTUnit *AST = ASTUnit::LoadFromPCHFile(Filename, &Error); - if (!AST) { - CI.getDiagnostics().Report(diag::err_fe_invalid_ast_file) << Error; + ASTUnit *AST = ASTUnit::LoadFromPCHFile(Filename, CI.getDiagnostics()); + if (!AST) goto failure; - } setCurrentFile(Filename, AST); @@ -224,5 +222,5 @@ void ASTFrontendAction::ExecuteAction() { ASTConsumer * PreprocessorFrontendAction::CreateASTConsumer(CompilerInstance &CI, llvm::StringRef InFile) { - llvm::llvm_unreachable("Invalid CreateASTConsumer on preprocessor action!"); + llvm_unreachable("Invalid CreateASTConsumer on preprocessor action!"); } |