Distinguish the various kinds of AST file loading failures:
file corruption, compiler version mismatch, target/language configuration mismatch, out-of-date AST file. No functionality change yet. llvm-svn: 166446
This commit is contained in:
@@ -814,7 +814,10 @@ ASTUnit *ASTUnit::LoadFromASTFile(const std::string &Filename,
|
||||
break;
|
||||
|
||||
case ASTReader::Failure:
|
||||
case ASTReader::IgnorePCH:
|
||||
case ASTReader::OutOfDate:
|
||||
case ASTReader::VersionMismatch:
|
||||
case ASTReader::ConfigurationMismatch:
|
||||
case ASTReader::HadErrors:
|
||||
AST->getDiagnostics().Report(diag::err_fe_unable_to_load_pch);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user