X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=tools%2Fllvm-readobj%2FARMEHABIPrinter.h;fp=tools%2Fllvm-readobj%2FARMEHABIPrinter.h;h=1da0095c7b30e3005ef1daa1b38d21a5913063b2;hb=a70c93ccd6adac002d169ccab7a51ea0a224d534;hp=9e13e385538c6036b3d32dc4eb4bdec64c2313f0;hpb=75cacfb4903fb4530b20773bcd482973e0e7e95d;p=oota-llvm.git diff --git a/tools/llvm-readobj/ARMEHABIPrinter.h b/tools/llvm-readobj/ARMEHABIPrinter.h index 9e13e385538..1da0095c7b3 100644 --- a/tools/llvm-readobj/ARMEHABIPrinter.h +++ b/tools/llvm-readobj/ARMEHABIPrinter.h @@ -365,10 +365,9 @@ PrinterContext::FindExceptionTable(unsigned IndexSectionIndex, /// handling table. Use this symbol to recover the actual exception handling /// table. - for (Elf_Shdr_iterator SI = ELF->section_begin(), SE = ELF->section_end(); - SI != SE; ++SI) { - if (SI->sh_type == ELF::SHT_REL && SI->sh_info == IndexSectionIndex) { - for (Elf_Rel_iterator RI = ELF->rel_begin(&*SI), RE = ELF->rel_end(&*SI); + for (const Elf_Shdr &Sec : ELF->sections()) { + if (Sec.sh_type == ELF::SHT_REL && Sec.sh_info == IndexSectionIndex) { + for (Elf_Rel_iterator RI = ELF->rel_begin(&Sec), RE = ELF->rel_end(&Sec); RI != RE; ++RI) { if (RI->r_offset == static_cast(IndexTableOffset)) { typename object::ELFFile::Elf_Rela RelA; @@ -377,7 +376,7 @@ PrinterContext::FindExceptionTable(unsigned IndexSectionIndex, RelA.r_addend = 0; std::pair Symbol = - ELF->getRelocationSymbol(&(*SI), &RelA); + ELF->getRelocationSymbol(&Sec, &RelA); return ELF->getSection(Symbol.second); }