[llvm-objdump] Migrate some functions from std::error_code to Error
llvm-svn: 357965
diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp
index 23dc18f..bbee17b 100644
--- a/llvm/tools/llvm-objdump/MachODump.cpp
+++ b/llvm/tools/llvm-objdump/MachODump.cpp
@@ -362,14 +362,12 @@
// If we couldn't find a symbol that this relocation refers to, try
// to find a section beginning instead.
for (const SectionRef &Section : ToolSectionFilter(*O)) {
- std::error_code ec;
-
StringRef Name;
uint64_t Addr = Section.getAddress();
if (Addr != Val)
continue;
- if ((ec = Section.getName(Name)))
- report_error(O->getFileName(), ec);
+ if (std::error_code EC = Section.getName(Name))
+ report_error(errorCodeToError(EC), O->getFileName());
Fmt << Name;
return;
}