diff options
| author | Adrian Prantl <aprantl@apple.com> | 2016-08-29 20:46:56 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2016-08-29 20:46:56 +0000 |
| commit | 9a06a882bc8be47370b6d350895a5708f4616ca9 (patch) | |
| tree | 7c9389957b0068dc51628de6fc25d6f3e2b5d550 | |
| parent | 7060af9d225b7a2065d9bb698673dedead7c57d6 (diff) | |
| download | bcm5719-llvm-9a06a882bc8be47370b6d350895a5708f4616ca9.tar.gz bcm5719-llvm-9a06a882bc8be47370b6d350895a5708f4616ca9.zip | |
Fix a bug preventing the cause of a module-out-of-date error from being printed
llvm-svn: 280009
| -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 14d22f6efd9..753365bf026 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -3769,7 +3769,7 @@ ASTReader::ReadASTCore(StringRef FileName, // Otherwise, return an error. Diag(diag::err_module_file_out_of_date) << 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 a6f6a6268c1..df9c346588a 100644 --- a/clang/test/Modules/explicit-build.cpp +++ b/clang/test/Modules/explicit-build.cpp @@ -199,6 +199,6 @@ // RUN: -fmodule-file=%t/c.pcm \ // RUN: %s -DHAVE_A -DHAVE_B -DHAVE_C 2>&1 | FileCheck --check-prefix=CHECK-MISMATCHED-B %s // -// CHECK-MISMATCHED-B: fatal error: module file '{{.*}}b.pcm' is out of date and needs to be rebuilt +// CHECK-MISMATCHED-B: fatal error: module file '{{.*}}b.pcm' is out of date and needs to be rebuilt: module file out of date // CHECK-MISMATCHED-B-NEXT: note: imported by module 'c' // CHECK-MISMATCHED-B-NOT: note: |

