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

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 15:03:02 PST 2016


davide added inline comments.


================
Comment at: lib/LTO/LTOCodeGenerator.cpp:261
+    std::string ErrMsg = "could not write object file: ";
+    ErrMsg += Filename;
+    emitError(ErrMsg);
----------------
efriedma wrote:
> mehdi_amini wrote:
> > Can you get the ` + Filename` on the same line as the initialization for ErrMsg? 
> > (Otherwise never mind).
> > 
> I guess I could write `std::string ErrMsg = Twine("could not write object file: ") + Filename;`.  Is that better?
I would rather leave it as is.


Repository:
  rL LLVM

https://reviews.llvm.org/D26371





More information about the llvm-commits mailing list