From: Simon Marchi Date: Wed, 11 Mar 2026 18:05:31 +0000 (-0400) Subject: gdb/dwarf: change dwarf2_is_constructor to return bool X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2864a69072dbf7719cf202b59bcb45efb1dbcddc;p=thirdparty%2Fbinutils-gdb.git gdb/dwarf: change dwarf2_is_constructor to return bool Change-Id: I207d368269494a4a36884847f4474e2f6c326511 Approved-By: Tom Tromey --- diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index a8b2716e664..1423dd0a574 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -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