]> granicus.if.org Git - clang/commitdiff
Fix a bug preventing the cause for a module file-not-found from being displayed
authorAdrian Prantl <aprantl@apple.com>
Mon, 29 Aug 2016 20:46:59 +0000 (20:46 +0000)
committerAdrian Prantl <aprantl@apple.com>
Mon, 29 Aug 2016 20:46:59 +0000 (20:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280010 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Serialization/ASTReader.cpp
test/Modules/explicit-build.cpp

index 753365bf02685a3485ed28c7342c836f9a420b03..f8e4384c630231e19ea6f349bf143f16cf932ae9 100644 (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;
 
index df9c346588a7d6fe79eb441f4e470c3fe2097b7b..16eb604708c9d8306e5919bfe4a7e712b7dd8309 100644 (file)
 // 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 \