diff options
Diffstat (limited to 'llvm/tools/llvm-link/llvm-link.cpp')
| -rw-r--r-- | llvm/tools/llvm-link/llvm-link.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/llvm-link/llvm-link.cpp b/llvm/tools/llvm-link/llvm-link.cpp index ed8c06e7984..9e217201a72 100644 --- a/llvm/tools/llvm-link/llvm-link.cpp +++ b/llvm/tools/llvm-link/llvm-link.cpp @@ -110,10 +110,10 @@ int main(int argc, char **argv) { if (DumpAsm) errs() << "Here's the assembly:\n" << *Composite; - std::string ErrorInfo; - tool_output_file Out(OutputFilename.c_str(), ErrorInfo, sys::fs::F_None); - if (!ErrorInfo.empty()) { - errs() << ErrorInfo << '\n'; + std::error_code EC; + tool_output_file Out(OutputFilename, EC, sys::fs::F_None); + if (EC) { + errs() << EC.message() << '\n'; return 1; } |

