diff options
Diffstat (limited to 'llvm/tools/llvm-extract/llvm-extract.cpp')
-rw-r--r-- | llvm/tools/llvm-extract/llvm-extract.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/llvm-extract/llvm-extract.cpp b/llvm/tools/llvm-extract/llvm-extract.cpp index 0f7086802a4..e36945641a4 100644 --- a/llvm/tools/llvm-extract/llvm-extract.cpp +++ b/llvm/tools/llvm-extract/llvm-extract.cpp @@ -261,10 +261,10 @@ int main(int argc, char **argv) { Passes.add(createStripDeadDebugInfoPass()); // Remove dead debug info Passes.add(createStripDeadPrototypesPass()); // Remove dead func decls - 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; } |