[llvm] r359100 - [llvm-objdump] errorToErrorCode+message -> toString
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 08:03:47 PDT 2019
Author: maskray
Date: Wed Apr 24 08:03:46 2019
New Revision: 359100
URL: http://llvm.org/viewvc/llvm-project?rev=359100&view=rev
Log:
[llvm-objdump] errorToErrorCode+message -> toString
Modified:
llvm/trunk/tools/llvm-objdump/ELFDump.cpp
Modified: llvm/trunk/tools/llvm-objdump/ELFDump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/ELFDump.cpp?rev=359100&r1=359099&r2=359100&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/ELFDump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/ELFDump.cpp Wed Apr 24 08:03:46 2019
@@ -131,7 +131,7 @@ static uint64_t getSectionLMA(const ELFF
const object::ELFSectionRef &Sec) {
auto PhdrRangeOrErr = Obj->program_headers();
if (!PhdrRangeOrErr)
- report_fatal_error(errorToErrorCode(PhdrRangeOrErr.takeError()).message());
+ report_fatal_error(toString(PhdrRangeOrErr.takeError()));
// Search for a PT_LOAD segment containing the requested section. Use this
// segment's p_addr to calculate the section's LMA.
@@ -178,7 +178,7 @@ void printDynamicSection(const ELFFile<E
outs() << (Data + Dyn.d_un.d_val) << "\n";
continue;
}
- warn(errorToErrorCode(StrTabOrErr.takeError()).message());
+ warn(toString(StrTabOrErr.takeError()));
consumeError(StrTabOrErr.takeError());
}
outs() << format(Fmt, (uint64_t)Dyn.d_un.d_val);
@@ -189,8 +189,7 @@ template <class ELFT> void printProgramH
outs() << "Program Header:\n";
auto ProgramHeaderOrError = o->program_headers();
if (!ProgramHeaderOrError)
- report_fatal_error(
- errorToErrorCode(ProgramHeaderOrError.takeError()).message());
+ report_fatal_error(toString(ProgramHeaderOrError.takeError()));
for (const typename ELFT::Phdr &Phdr : *ProgramHeaderOrError) {
switch (Phdr.p_type) {
case ELF::PT_DYNAMIC:
More information about the llvm-commits
mailing list