[cfe-commits] r146002 - in /cfe/trunk: include/clang/Basic/DiagnosticFrontendKinds.td lib/Frontend/CompilerInstance.cpp
Douglas Gregor
dgregor at apple.com
Tue Dec 6 16:54:14 PST 2011
Author: dgregor
Date: Tue Dec 6 18:54:14 2011
New Revision: 146002
URL: http://llvm.org/viewvc/llvm-project?rev=146002&view=rev
Log:
If we can't write the temporary module map file when compiling a
module, at least have the decency to complain about it.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
cfe/trunk/lib/Frontend/CompilerInstance.cpp
Modified: cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td?rev=146002&r1=146001&r2=146002&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td Tue Dec 6 18:54:14 2011
@@ -183,5 +183,6 @@
def err_no_submodule : Error<"no submodule named %0 in module '%1'">;
def err_no_submodule_suggest : Error<
"no submodule named %0 in module '%1'; did you mean '%2'?">;
-
+def err_module_map_temp_file : Error<
+ "unable to write temporary module map file '%0'">, DefaultFatal;
}
Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=146002&r1=146001&r2=146002&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Tue Dec 6 18:54:14 2011
@@ -1026,7 +1026,8 @@
TempModuleMapFileName,
/*makeAbsolute=*/true)
!= llvm::errc::success) {
- // FIXME: Give a sensible error message here.
+ ImportingInstance.getDiagnostics().Report(diag::err_module_map_temp_file)
+ << TempModuleMapFileName;
return;
}
// Print the module map to this file.
More information about the cfe-commits
mailing list