]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/dwarf: change dwarf2_flag_true_p to return bool
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 11 Mar 2026 18:05:27 +0000 (14:05 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 12 Mar 2026 14:20:50 +0000 (10:20 -0400)
Change-Id: Ie60d5d715171f7482f77598553e9236c3fe94ab1
Approved-By: Tom Tromey <tom@tromey.com>
gdb/dwarf2/read.c

index d52f0651de1bcfd497a33bd2f5e6273fc6f70f6d..827772a2af78c0daac5be19209d2ba6c871fc04b 100644 (file)
@@ -724,8 +724,8 @@ static const char *dwarf2_string_attr (struct die_info *die, unsigned int name,
 
 static const char *dwarf2_dwo_name (struct die_info *die, struct dwarf2_cu *cu);
 
-static int dwarf2_flag_true_p (struct die_info *die, unsigned name,
-                              struct dwarf2_cu *cu);
+static bool dwarf2_flag_true_p (struct die_info *die, unsigned name,
+                               struct dwarf2_cu *cu);
 
 static int die_is_declaration (struct die_info *, struct dwarf2_cu *cu);
 
@@ -15175,11 +15175,11 @@ dwarf2_dwo_name (struct die_info *die, struct dwarf2_cu *cu)
   return dwo_name;
 }
 
-/* Return non-zero iff the attribute NAME is defined for the given DIE,
+/* Return true iff the attribute NAME is defined for the given DIE,
    and holds a non-zero value.  This function should only be used for
    DW_FORM_flag or DW_FORM_flag_present attributes.  */
 
-static int
+static bool
 dwarf2_flag_true_p (struct die_info *die, unsigned name, struct dwarf2_cu *cu)
 {
   struct attribute *attr = dwarf2_attr (die, name, cu);