[llvm] r191911 - raw_fd_ostream: Be more verbose about the reason when opening a file fails.
Benjamin Kramer
benny.kra at googlemail.com
Thu Oct 3 09:59:15 PDT 2013
Author: d0k
Date: Thu Oct 3 11:59:14 2013
New Revision: 191911
URL: http://llvm.org/viewvc/llvm-project?rev=191911&view=rev
Log:
raw_fd_ostream: Be more verbose about the reason when opening a file fails.
Modified:
llvm/trunk/lib/Support/raw_ostream.cpp
Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=191911&r1=191910&r2=191911&view=diff
==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Thu Oct 3 11:59:14 2013
@@ -447,7 +447,8 @@ raw_fd_ostream::raw_fd_ostream(const cha
error_code EC = sys::fs::openFileForWrite(Filename, FD, Flags);
if (EC) {
- ErrorInfo = "Error opening output file '" + std::string(Filename) + "'";
+ ErrorInfo = "Error opening output file '" + std::string(Filename) + "': " +
+ EC.message();
ShouldClose = false;
return;
}
More information about the llvm-commits
mailing list