raw_fd_ostream: Be more verbose about the reason when opening a file fails.

llvm-svn: 191911
This commit is contained in:
Benjamin Kramer 2013-10-03 16:59:14 +00:00
parent 91a163a18a
commit e783c63afd

View File

@ -447,7 +447,8 @@ raw_fd_ostream::raw_fd_ostream(const char *Filename, std::string &ErrorInfo,
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;
}