summaryrefslogtreecommitdiff
path: root/tools/obj2yaml/obj2yaml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/obj2yaml/obj2yaml.cpp')
-rw-r--r--tools/obj2yaml/obj2yaml.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/obj2yaml/obj2yaml.cpp b/tools/obj2yaml/obj2yaml.cpp
index 717c68d1c6..944314a923 100644
--- a/tools/obj2yaml/obj2yaml.cpp
+++ b/tools/obj2yaml/obj2yaml.cpp
@@ -18,9 +18,8 @@
using namespace llvm;
using namespace llvm::object;
-using std::error_code;
-static error_code dumpObject(const ObjectFile &Obj) {
+static std::error_code dumpObject(const ObjectFile &Obj) {
if (Obj.isCOFF())
return coff2yaml(outs(), cast<COFFObjectFile>(Obj));
if (Obj.isELF())
@@ -29,12 +28,12 @@ static error_code dumpObject(const ObjectFile &Obj) {
return obj2yaml_error::unsupported_obj_file_format;
}
-static error_code dumpInput(StringRef File) {
+static std::error_code dumpInput(StringRef File) {
if (File != "-" && !sys::fs::exists(File))
return obj2yaml_error::file_not_found;
ErrorOr<Binary *> BinaryOrErr = createBinary(File);
- if (error_code EC = BinaryOrErr.getError())
+ if (std::error_code EC = BinaryOrErr.getError())
return EC;
std::unique_ptr<Binary> Binary(BinaryOrErr.get());
@@ -54,7 +53,7 @@ int main(int argc, char *argv[]) {
PrettyStackTraceProgram X(argc, argv);
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
- if (error_code EC = dumpInput(InputFilename)) {
+ if (std::error_code EC = dumpInput(InputFilename)) {
errs() << "Error: '" << EC.message() << "'\n";
return 1;
}