r271758 - [Modules] Improve diagnostics for LockFileManager errors
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 3 18:13:22 PDT 2016
Author: bruno
Date: Fri Jun 3 20:13:22 2016
New Revision: 271758
URL: http://llvm.org/viewvc/llvm-project?rev=271758&view=rev
Log:
[Modules] Improve diagnostics for LockFileManager errors
Uses error message now provided by LockFileManager in LLVM r271755.
rdar://problem/26529101
Modified:
cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td
cfe/trunk/lib/Frontend/CompilerInstance.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td?rev=271758&r1=271757&r2=271758&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticCommonKinds.td Fri Jun 3 20:13:22 2016
@@ -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">,
Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=271758&r1=271757&r2=271758&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Fri Jun 3 20:13:22 2016
@@ -1086,7 +1086,7 @@ static bool compileAndLoadModule(Compile
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:
More information about the cfe-commits
mailing list