summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Support/raw_ostream.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp
index 92fa8b50a1..cb9648981a 100644
--- a/lib/Support/raw_ostream.cpp
+++ b/lib/Support/raw_ostream.cpp
@@ -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;
}