diff options
Diffstat (limited to 'contrib/llvm/tools/llvm-as/llvm-as.cpp')
-rw-r--r-- | contrib/llvm/tools/llvm-as/llvm-as.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/llvm/tools/llvm-as/llvm-as.cpp b/contrib/llvm/tools/llvm-as/llvm-as.cpp index 007241c..5ccf505 100644 --- a/contrib/llvm/tools/llvm-as/llvm-as.cpp +++ b/contrib/llvm/tools/llvm-as/llvm-as.cpp @@ -69,11 +69,11 @@ static void WriteOutputFile(const Module *M) { } } - std::string ErrorInfo; + std::error_code EC; std::unique_ptr<tool_output_file> Out( - new tool_output_file(OutputFilename.c_str(), ErrorInfo, sys::fs::F_None)); - if (!ErrorInfo.empty()) { - errs() << ErrorInfo << '\n'; + new tool_output_file(OutputFilename, EC, sys::fs::F_None)); + if (EC) { + errs() << EC.message() << '\n'; exit(1); } @@ -94,7 +94,7 @@ int main(int argc, char **argv) { // Parse the file now... SMDiagnostic Err; - std::unique_ptr<Module> M(ParseAssemblyFile(InputFilename, Err, Context)); + std::unique_ptr<Module> M = parseAssemblyFile(InputFilename, Err, Context); if (!M.get()) { Err.print(argv[0], errs()); return 1; |