]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Remove duplicate testing for allowed forms in check_debug_abbrev
authorPetr Machata <pmachata@redhat.com>
Sat, 9 Oct 2010 17:21:43 +0000 (19:21 +0200)
committerPetr Machata <pmachata@redhat.com>
Sat, 9 Oct 2010 17:21:43 +0000 (19:21 +0200)
dwarflint/check_debug_abbrev.cc

index bca382ad6f437dd00d9b4744e3720a4784950c56..4d0c6dac539bb097f4992255bd1aa0890b6eb20d 100644 (file)
@@ -441,33 +441,12 @@ namespace
                  };
              }
 
-           /* Similar for DW_AT_ranges.  */
-           else if (attrib_name == DW_AT_ranges
-                    || attrib_name == DW_AT_stmt_list)
-             {
-               if (attrib_form != DW_FORM_data4
-                   && attrib_form != DW_FORM_data8
-                   && attrib_form != DW_FORM_sec_offset
-                   && attrib_form != DW_FORM_indirect)
-                 complain_invalid_form (where, attrib_name, attrib_form);
-               if (attrib_name == DW_AT_ranges)
-                 ranges = true;
-             }
-
-           /* Similar for DW_AT_{low,high}_pc, plus also make sure we
-              don't see high_pc without low_pc.  */
-           else if (attrib_name == DW_AT_low_pc
-                    || attrib_name == DW_AT_high_pc)
-             {
-               if (attrib_form != DW_FORM_addr
-                   && attrib_form != DW_FORM_ref_addr)
-                 complain_invalid_form (where, attrib_name, attrib_form);
-
-               if (attrib_name == DW_AT_low_pc)
-                 low_pc = true;
-               else if (attrib_name == DW_AT_high_pc)
-                 high_pc = true;
-             }
+           else if (attrib_name == DW_AT_ranges)
+             ranges = true;
+           else if (attrib_name == DW_AT_low_pc)
+             low_pc = true;
+           else if (attrib_name == DW_AT_high_pc)
+             high_pc = true;
 
            acur->name = attrib_name;
            acur->form = attrib_form;