aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-stress/llvm-stress.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-stress/llvm-stress.cpp')
-rw-r--r--tools/llvm-stress/llvm-stress.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/llvm-stress/llvm-stress.cpp b/tools/llvm-stress/llvm-stress.cpp
index 23d3b63..21a79e3 100644
--- a/tools/llvm-stress/llvm-stress.cpp
+++ b/tools/llvm-stress/llvm-stress.cpp
@@ -704,11 +704,10 @@ int main(int argc, char **argv) {
if (OutputFilename.empty())
OutputFilename = "-";
- std::string ErrorInfo;
- Out.reset(new tool_output_file(OutputFilename.c_str(), ErrorInfo,
- sys::fs::F_None));
- if (!ErrorInfo.empty()) {
- errs() << ErrorInfo << '\n';
+ std::error_code EC;
+ Out.reset(new tool_output_file(OutputFilename, EC, sys::fs::F_None));
+ if (EC) {
+ errs() << EC.message() << '\n';
return 1;
}