From 4825fd7fbb3fe87cdf8da9bccc1361fac45bdf2d Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 22 Oct 2012 22:50:17 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166446 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInstance.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/Frontend/CompilerInstance.cpp') diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index a8cafdbfef..225bc137fb 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -354,7 +354,10 @@ CompilerInstance::createPCHExternalASTSource(StringRef Path, // Unrecoverable failure: don't even try to process the input file. break; - case ASTReader::IgnorePCH: + case ASTReader::OutOfDate: + case ASTReader::VersionMismatch: + case ASTReader::ConfigurationMismatch: + case ASTReader::HadErrors: // No suitable PCH file could be found. Return an error. break; } @@ -966,7 +969,10 @@ Module *CompilerInstance::loadModule(SourceLocation ImportLoc, case ASTReader::Success: break; - case ASTReader::IgnorePCH: + case ASTReader::OutOfDate: + case ASTReader::VersionMismatch: + case ASTReader::ConfigurationMismatch: + case ASTReader::HadErrors: // FIXME: The ASTReader will already have complained, but can we showhorn // that diagnostic information into a more useful form? KnownModules[Path[0].first] = 0; -- cgit v1.2.3