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

index a8b2716e66494d4a57656d253db21b6476455835..1423dd0a574b5a6c31a018086067e7ab415594ac 100644 (file)
@@ -9891,7 +9891,7 @@ dwarf2_attach_fields_to_type (struct field_info *fip, struct type *type,
 /* Return true if this member function is a constructor, false
    otherwise.  */
 
-static int
+static bool
 dwarf2_is_constructor (struct die_info *die, struct dwarf2_cu *cu)
 {
   const char *fieldname;
@@ -9899,17 +9899,17 @@ dwarf2_is_constructor (struct die_info *die, struct dwarf2_cu *cu)
   int len;
 
   if (die->parent == NULL)
-    return 0;
+    return false;
 
   if (die->parent->tag != DW_TAG_structure_type
       && die->parent->tag != DW_TAG_union_type
       && die->parent->tag != DW_TAG_class_type)
-    return 0;
+    return false;
 
   fieldname = dwarf2_name (die, cu);
   type_name = dwarf2_name (die->parent, cu);
   if (fieldname == NULL || type_name == NULL)
-    return 0;
+    return false;
 
   len = strlen (fieldname);
   return (strncmp (fieldname, type_name, len) == 0