diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-11-03 19:07:15 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-11-03 19:07:15 +0000 |
commit | 354680ac35afc3bbc6775b0d95f2297abeb7d795 (patch) | |
tree | 6a772af60091d7d73a3ea86f48c692182ac9ec8e /llvm/tools/llvm-readobj/ELFDumper.cpp | |
parent | 018ac39f942585a32d4809bb5b014af4c3c60dea (diff) | |
download | bcm5719-llvm-354680ac35afc3bbc6775b0d95f2297abeb7d795.tar.gz bcm5719-llvm-354680ac35afc3bbc6775b0d95f2297abeb7d795.zip |
Remove the last use of report_fatal_error from ELF.h.
llvm-svn: 285955
Diffstat (limited to 'llvm/tools/llvm-readobj/ELFDumper.cpp')
-rw-r--r-- | llvm/tools/llvm-readobj/ELFDumper.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp index bde7a6ebbea..0fdf3919470 100644 --- a/llvm/tools/llvm-readobj/ELFDumper.cpp +++ b/llvm/tools/llvm-readobj/ELFDumper.cpp @@ -2067,7 +2067,7 @@ template <class ELFT> void MipsGOTParser<ELFT>::parsePLT() { switch (PLTRelShdr->sh_type) { case ELF::SHT_REL: - for (const Elf_Rel &Rel : Obj->rels(PLTRelShdr)) { + for (const Elf_Rel &Rel : unwrapOrError(Obj->rels(PLTRelShdr))) { const Elf_Sym *Sym = unwrapOrError(Obj->getRelocationSymbol(&Rel, SymTable)); printPLTEntry(PLTShdr->sh_addr, PLTBegin, It, StrTable, Sym); @@ -2076,7 +2076,7 @@ template <class ELFT> void MipsGOTParser<ELFT>::parsePLT() { } break; case ELF::SHT_RELA: - for (const Elf_Rela &Rel : Obj->relas(PLTRelShdr)) { + for (const Elf_Rela &Rel : unwrapOrError(Obj->relas(PLTRelShdr))) { const Elf_Sym *Sym = unwrapOrError(Obj->getRelocationSymbol(&Rel, SymTable)); printPLTEntry(PLTShdr->sh_addr, PLTBegin, It, StrTable, Sym); @@ -2531,7 +2531,7 @@ template <class ELFT> void GNUStyle<ELFT>::printRelocations(const ELFO *Obj) { printRelocHeader(OS, ELFT::Is64Bits, (Sec.sh_type == ELF::SHT_RELA)); const Elf_Shdr *SymTab = unwrapOrError(Obj->getSection(Sec.sh_link)); if (Sec.sh_type == ELF::SHT_REL) { - for (const auto &R : Obj->rels(&Sec)) { + for (const auto &R : unwrapOrError(Obj->rels(&Sec))) { Elf_Rela Rela; Rela.r_offset = R.r_offset; Rela.r_info = R.r_info; @@ -2539,7 +2539,7 @@ template <class ELFT> void GNUStyle<ELFT>::printRelocations(const ELFO *Obj) { printRelocation(Obj, SymTab, Rela, false); } } else { - for (const auto &R : Obj->relas(&Sec)) + for (const auto &R : unwrapOrError(Obj->relas(&Sec))) printRelocation(Obj, SymTab, R, true); } } @@ -3388,7 +3388,7 @@ void LLVMStyle<ELFT>::printRelocations(const Elf_Shdr *Sec, const ELFO *Obj) { switch (Sec->sh_type) { case ELF::SHT_REL: - for (const Elf_Rel &R : Obj->rels(Sec)) { + for (const Elf_Rel &R : unwrapOrError(Obj->rels(Sec))) { Elf_Rela Rela; Rela.r_offset = R.r_offset; Rela.r_info = R.r_info; @@ -3397,7 +3397,7 @@ void LLVMStyle<ELFT>::printRelocations(const Elf_Shdr *Sec, const ELFO *Obj) { } break; case ELF::SHT_RELA: - for (const Elf_Rela &R : Obj->relas(Sec)) + for (const Elf_Rela &R : unwrapOrError(Obj->relas(Sec))) printRelocation(Obj, R, SymTab); break; } |