[llvm] r359110 - Revert "[llvm-objdump] errorToErrorCode+message -> toString"
JF Bastien via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 09:49:30 PDT 2019
Author: jfb
Date: Wed Apr 24 09:49:30 2019
New Revision: 359110
URL: http://llvm.org/viewvc/llvm-project?rev=359110&view=rev
Log:
Revert "[llvm-objdump] errorToErrorCode+message -> toString"
Revert r359100
It breaks llvm/test/Object/elf-invalid-phdr.test
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=359110&r1=359109&r2=359110&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/ELFDump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/ELFDump.cpp Wed Apr 24 09:49:30 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(toString(PhdrRangeOrErr.takeError()));
+ report_fatal_error(errorToErrorCode(PhdrRangeOrErr.takeError()).message());
// 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(toString(StrTabOrErr.takeError()));
+ warn(errorToErrorCode(StrTabOrErr.takeError()).message());
consumeError(StrTabOrErr.takeError());
}
outs() << format(Fmt, (uint64_t)Dyn.d_un.d_val);
@@ -189,7 +189,8 @@ template <class ELFT> void printProgramH
outs() << "Program Header:\n";
auto ProgramHeaderOrError = o->program_headers();
if (!ProgramHeaderOrError)
- report_fatal_error(toString(ProgramHeaderOrError.takeError()));
+ report_fatal_error(
+ errorToErrorCode(ProgramHeaderOrError.takeError()).message());
for (const typename ELFT::Phdr &Phdr : *ProgramHeaderOrError) {
switch (Phdr.p_type) {
case ELF::PT_DYNAMIC:
More information about the llvm-commits
mailing list