Fix a bug preventing the cause for a module file-not-found from being displayed

llvm-svn: 280010
This commit is contained in:
Adrian Prantl 2016-08-29 20:46:59 +00:00
parent 9a06a882bc
commit b3b5a7362c
2 changed files with 2 additions and 2 deletions

View File

@ -3757,7 +3757,7 @@ ASTReader::ReadASTCore(StringRef FileName,
// Otherwise, return an error.
Diag(diag::err_module_file_not_found) << moduleKindForDiagnostic(Type)
<< FileName << ErrorStr.empty()
<< FileName << !ErrorStr.empty()
<< ErrorStr;
return Failure;

View File

@ -167,7 +167,7 @@
// RUN: -fmodule-file=%t/nonexistent.pcm \
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-FILE %s
//
// CHECK-NO-FILE: fatal error: module file '{{.*}}nonexistent.pcm' not found
// CHECK-NO-FILE: fatal error: module file '{{.*}}nonexistent.pcm' not found: module file not found
// RUN: mv %t/a.pcm %t/a-tmp.pcm
// RUN: not %clang_cc1 -x c++ -std=c++11 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -Rmodule-build -fno-modules-error-recovery \