llvm.org GIT mirror llvm / c505e6d
Use continue to reduce indentation. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244480 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 4 years ago
1 changed file(s) with 19 addition(s) and 17 deletion(s). Raw diff Collapse all Expand all
368368 /// table.
369369
370370 for (const Elf_Shdr &Sec : ELF->sections()) {
371 if (Sec.sh_type == ELF::SHT_REL && Sec.sh_info == IndexSectionIndex) {
372 for (const Elf_Rel &R : ELF->rels(&Sec)) {
373 if (R.r_offset == static_cast(IndexTableOffset)) {
374 typename object::ELFFile::Elf_Rela RelA;
375 RelA.r_offset = R.r_offset;
376 RelA.r_info = R.r_info;
377 RelA.r_addend = 0;
378
379 std::pair Symbol =
380 ELF->getRelocationSymbol(&Sec, &RelA);
381
382 ErrorOr Ret = ELF->getSection(Symbol.second);
383 if (std::error_code EC = Ret.getError())
384 report_fatal_error(EC.message());
385 return *Ret;
386 }
387 }
371 if (Sec.sh_type != ELF::SHT_REL || Sec.sh_info != IndexSectionIndex)
372 continue;
373
374 for (const Elf_Rel &R : ELF->rels(&Sec)) {
375 if (R.r_offset != static_cast(IndexTableOffset))
376 continue;
377
378 typename object::ELFFile::Elf_Rela RelA;
379 RelA.r_offset = R.r_offset;
380 RelA.r_info = R.r_info;
381 RelA.r_addend = 0;
382
383 std::pair Symbol =
384 ELF->getRelocationSymbol(&Sec, &RelA);
385
386 ErrorOr Ret = ELF->getSection(Symbol.second);
387 if (std::error_code EC = Ret.getError())
388 report_fatal_error(EC.message());
389 return *Ret;
388390 }
389391 }
390392 return nullptr;