From 8a60bbe13f1d75daf0fc1812e17252a0a6003352 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 6 Jul 2011 17:40:26 +0000 Subject: Keep track of when "unrecoverable" errors occur, then allow clang_saveTranslationUnit() to save a PCH file if the only errors it contains are recoverable errors. Fixes . llvm-svn: 134503 --- clang/lib/Frontend/ASTUnit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Frontend/ASTUnit.cpp') diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp index 8f61d6a8c2d..4407d2d3e22 100644 --- a/clang/lib/Frontend/ASTUnit.cpp +++ b/clang/lib/Frontend/ASTUnit.cpp @@ -2288,7 +2288,7 @@ void ASTUnit::CodeComplete(llvm::StringRef File, unsigned Line, unsigned Column, } CXSaveError ASTUnit::Save(llvm::StringRef File) { - if (getDiagnostics().hasErrorOccurred()) + if (getDiagnostics().hasUnrecoverableErrorOccurred()) return CXSaveError_TranslationErrors; // FIXME: Can we somehow regenerate the stat cache here, or do we need to -- cgit v1.2.3