[PATCH] D26371: [LTO] Add error message on IO error in compileOptimizedToFile.

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 15:52:57 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL286177: [LTO] Add error message on IO error in compileOptimizedToFile. (authored by efriedma).

Changed prior to commit:
  https://reviews.llvm.org/D26371?vs=77103&id=77111#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D26371

Files:
  llvm/trunk/lib/LTO/LTOCodeGenerator.cpp


Index: llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
===================================================================
--- llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
+++ llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
@@ -257,6 +257,8 @@
   bool genResult = compileOptimized(&objFile.os());
   objFile.os().close();
   if (objFile.os().has_error()) {
+    Twine ErrMsg = "could not write object file: " + Filename.str();
+    emitError(ErrMsg.str());
     objFile.os().clear_error();
     sys::fs::remove(Twine(Filename));
     return false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26371.77111.patch
Type: text/x-patch
Size: 527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161107/b756c361/attachment.bin>


More information about the llvm-commits mailing list