diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-05-24 05:44:08 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-05-24 05:44:08 +0000 |
commit | dc9fdaf2171cc480300d5572606a8ede1678d18b (patch) | |
tree | df9549534016f49322087b6780ade57739f298ae /clang/lib/Frontend/CompilerInstance.cpp | |
parent | aa7906815724171e3f81d71fb9b12fd13b845311 (diff) | |
download | bcm5719-llvm-dc9fdaf2171cc480300d5572606a8ede1678d18b.tar.gz bcm5719-llvm-dc9fdaf2171cc480300d5572606a8ede1678d18b.zip |
[modules] If we hit a failure while loading a PCH/module, abort parsing instead of trying to continue in an invalid state.
Also don't let libclang create a PCH with such an error.
Fixes rdar://13953768
llvm-svn: 182629
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index cf856fc2ab6..b4bb6f32517 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1247,12 +1247,14 @@ CompilerInstance::loadModule(SourceLocation ImportLoc, case ASTReader::VersionMismatch: case ASTReader::ConfigurationMismatch: case ASTReader::HadErrors: + ModuleLoader::HadFatalFailure = true; // FIXME: The ASTReader will already have complained, but can we showhorn // that diagnostic information into a more useful form? KnownModules[Path[0].first] = 0; return ModuleLoadResult(); case ASTReader::Failure: + ModuleLoader::HadFatalFailure = true; // Already complained, but note now that we failed. KnownModules[Path[0].first] = 0; ModuleBuildFailed = true; |