From: Bruno Cardoso Lopes Date: Sat, 4 Jun 2016 01:13:22 +0000 (+0000) Subject: [Modules] Improve diagnostics for LockFileManager errors X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bdf3f27871b94ec92b0fd74abc4839308ee681d9;p=clang [Modules] Improve diagnostics for LockFileManager errors Uses error message now provided by LockFileManager in LLVM r271755. rdar://problem/26529101 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271758 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticCommonKinds.td b/include/clang/Basic/DiagnosticCommonKinds.td index 837fc6126e..f3fdeb283c 100644 --- a/include/clang/Basic/DiagnosticCommonKinds.td +++ b/include/clang/Basic/DiagnosticCommonKinds.td @@ -89,7 +89,7 @@ def err_module_unavailable : Error< def err_module_header_missing : Error< "%select{|umbrella }0header '%1' not found">; def err_module_lock_failure : Error< - "could not acquire lock file for module '%0'">, DefaultFatal; + "could not acquire lock file for module '%0': %1">, DefaultFatal; def err_module_lock_timeout : Error< "timed out waiting to acquire lock file for module '%0'">, DefaultFatal; def err_module_cycle : Error<"cyclic dependency in module '%0': %1">, diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 5648b90be8..64f571e17a 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -1086,7 +1086,7 @@ static bool compileAndLoadModule(CompilerInstance &ImportingInstance, switch (Locked) { case llvm::LockFileManager::LFS_Error: Diags.Report(ModuleNameLoc, diag::err_module_lock_failure) - << Module->Name; + << Module->Name << Locked.getErrorMessage(); return false; case llvm::LockFileManager::LFS_Owned: