[binutils-gdb] gdb/dwarf: change dwarf2_is_constructor to return bool
Simon Marchi via Gdb-cvs <[email protected]>
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2864a69072dbf7719cf202b59bcb45efb1dbcddc commit 2864a69072dbf7719cf202b59bcb45efb1dbcddc Author: Simon Marchi <[email protected]> Date: Wed Mar 11 14:05:31 2026 -0400 gdb/dwarf: change dwarf2_is_constructor to return bool Change-Id: I207d368269494a4a36884847f4474e2f6c326511 Approved-By: Tom Tromey <[email protected]> Diff: --- gdb/dwarf2/read.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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