diff options
| author | Adrian Prantl <aprantl@apple.com> | 2016-08-29 20:46:59 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2016-08-29 20:46:59 +0000 |
| commit | b3b5a7362c525c9e195e49cba31f4300aa491443 (patch) | |
| tree | f1f88859f3e9fdbef9ac33cb8524275ee29773f1 | |
| parent | 9a06a882bc8be47370b6d350895a5708f4616ca9 (diff) | |
| download | bcm5719-llvm-b3b5a7362c525c9e195e49cba31f4300aa491443.tar.gz bcm5719-llvm-b3b5a7362c525c9e195e49cba31f4300aa491443.zip | |
Fix a bug preventing the cause for a module file-not-found from being displayed
llvm-svn: 280010
| -rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Modules/explicit-build.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 753365bf026..f8e4384c630 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -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; diff --git a/clang/test/Modules/explicit-build.cpp b/clang/test/Modules/explicit-build.cpp index df9c346588a..16eb604708c 100644 --- a/clang/test/Modules/explicit-build.cpp +++ b/clang/test/Modules/explicit-build.cpp @@ -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 \ |

