[llvm] r244480 - Use continue to reduce indentation. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 11:57:42 PDT 2015
Author: rafael
Date: Mon Aug 10 13:57:42 2015
New Revision: 244480
URL: http://llvm.org/viewvc/llvm-project?rev=244480&view=rev
Log:
Use continue to reduce indentation. NFC.
Modified:
llvm/trunk/tools/llvm-readobj/ARMEHABIPrinter.h
Modified: llvm/trunk/tools/llvm-readobj/ARMEHABIPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ARMEHABIPrinter.h?rev=244480&r1=244479&r2=244480&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ARMEHABIPrinter.h (original)
+++ llvm/trunk/tools/llvm-readobj/ARMEHABIPrinter.h Mon Aug 10 13:57:42 2015
@@ -369,23 +369,25 @@ PrinterContext<ET>::FindExceptionTable(u
/// table.
for (const Elf_Shdr &Sec : ELF->sections()) {
- if (Sec.sh_type == ELF::SHT_REL && Sec.sh_info == IndexSectionIndex) {
- for (const Elf_Rel &R : ELF->rels(&Sec)) {
- if (R.r_offset == static_cast<unsigned>(IndexTableOffset)) {
- typename object::ELFFile<ET>::Elf_Rela RelA;
- RelA.r_offset = R.r_offset;
- RelA.r_info = R.r_info;
- RelA.r_addend = 0;
+ if (Sec.sh_type != ELF::SHT_REL || Sec.sh_info != IndexSectionIndex)
+ continue;
- std::pair<const Elf_Shdr *, const Elf_Sym *> Symbol =
- ELF->getRelocationSymbol(&Sec, &RelA);
+ for (const Elf_Rel &R : ELF->rels(&Sec)) {
+ if (R.r_offset != static_cast<unsigned>(IndexTableOffset))
+ continue;
- ErrorOr<const Elf_Shdr *> Ret = ELF->getSection(Symbol.second);
- if (std::error_code EC = Ret.getError())
- report_fatal_error(EC.message());
- return *Ret;
- }
- }
+ typename object::ELFFile<ET>::Elf_Rela RelA;
+ RelA.r_offset = R.r_offset;
+ RelA.r_info = R.r_info;
+ RelA.r_addend = 0;
+
+ std::pair<const Elf_Shdr *, const Elf_Sym *> Symbol =
+ ELF->getRelocationSymbol(&Sec, &RelA);
+
+ ErrorOr<const Elf_Shdr *> Ret = ELF->getSection(Symbol.second);
+ if (std::error_code EC = Ret.getError())
+ report_fatal_error(EC.message());
+ return *Ret;
}
}
return nullptr;
More information about the llvm-commits
mailing list