aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-as/llvm-as.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-as/llvm-as.cpp')
-rw-r--r--tools/llvm-as/llvm-as.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp
index 007241c..5ccf505 100644
--- a/tools/llvm-as/llvm-as.cpp
+++ b/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;