summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump/MachODump.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-04-09 05:41:24 +0000
committerFangrui Song <maskray@google.com>2019-04-09 05:41:24 +0000
commit3f2096833a7bce99aea7b06468621a3a5be6475e (patch)
tree75c6b25f1462badd9e9ffb66f4d3e66640f874df /llvm/tools/llvm-objdump/MachODump.cpp
parent206b9927f8362fe0a65151f76ec67caffe39d3ad (diff)
downloadbcm5719-llvm-3f2096833a7bce99aea7b06468621a3a5be6475e.tar.gz
bcm5719-llvm-3f2096833a7bce99aea7b06468621a3a5be6475e.zip
[llvm-objdump] Migrate some functions from std::error_code to Error
llvm-svn: 357965
Diffstat (limited to 'llvm/tools/llvm-objdump/MachODump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/MachODump.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp
index 23dc18f151d..bbee17b9587 100644
--- a/llvm/tools/llvm-objdump/MachODump.cpp
+++ b/llvm/tools/llvm-objdump/MachODump.cpp
@@ -362,14 +362,12 @@ static void printRelocationTargetName(const MachOObjectFile *O,
// 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;
}
OpenPOWER on IntegriCloud