]> granicus.if.org Git - clang/commitdiff
If we can't write the temporary module map file when compiling a
authorDouglas Gregor <dgregor@apple.com>
Wed, 7 Dec 2011 00:54:14 +0000 (00:54 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 7 Dec 2011 00:54:14 +0000 (00:54 +0000)
module, at least have the decency to complain about it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146002 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticFrontendKinds.td
lib/Frontend/CompilerInstance.cpp

index cd797fce4755ddff1f43a1b08ec8b9ff444701b3..ca15fee50b894487517056f707233fe9837c8d43 100644 (file)
@@ -183,5 +183,6 @@ def err_missing_umbrella_header : Error<
 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;
 }
index 454d7bd4fcee30efc4909fc2fcc2f0da1d4da0c3..7b3fe7876bef6fdffb8a024f4758577276e90531 100644 (file)
@@ -1026,7 +1026,8 @@ static void compileModule(CompilerInstance &ImportingInstance,
                                    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.