Use continue to reduce indentation. NFC.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 10 Aug 2015 18:57:42 +0000 (18:57 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 10 Aug 2015 18:57:42 +0000 (18:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244480 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-readobj/ARMEHABIPrinter.h

index 2917cf0e1181ca9153967275e52eacf9158058c4..7b2c79136a5877bb578193c8aaeaeb61c02e686f 100644 (file)
@@ -369,23 +369,25 @@ PrinterContext<ET>::FindExceptionTable(unsigned IndexSectionIndex,
   /// 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;
-
-          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;
-        }
-      }
+    if (Sec.sh_type != ELF::SHT_REL || Sec.sh_info != IndexSectionIndex)
+      continue;
+
+    for (const Elf_Rel &R : ELF->rels(&Sec)) {
+      if (R.r_offset != static_cast<unsigned>(IndexTableOffset))
+        continue;
+
+      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;