[binutils-gdb] gdb/dwarf: change is_vtable_name 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=f857e443c4c7dc5b80ada49df84abea770114fc0 commit f857e443c4c7dc5b80ada49df84abea770114fc0 Author: Simon Marchi <[email protected]> Date: Wed Mar 11 14:05:32 2026 -0400 gdb/dwarf: change is_vtable_name to return bool Change-Id: Ib14b18b75ddfc308b9987cd9102f0f721c91a3b1 Approved-By: Tom Tromey <[email protected]> Diff: --- gdb/dwarf2/read.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 1423dd0a574..4db3139a265 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -10147,18 +10147,16 @@ dwarf2_attach_fn_fields_to_type (struct field_info *fip, struct type *type, TYPE_NFN_FIELDS (type) = fip->fnfieldlists.size (); } -/* Returns non-zero if NAME is the name of a vtable member in CU's - language, zero otherwise. */ -static int +/* Returns true if NAME is the name of a vtable member in CU's + language, false otherwise. */ + +static bool is_vtable_name (const char *name, struct dwarf2_cu *cu) { static const char vptr[] = "_vptr"; /* Look for the C++ form of the vtable. */ - if (startswith (name, vptr) && is_cplus_marker (name[sizeof (vptr) - 1])) - return 1; - - return 0; + return startswith (name, vptr) && is_cplus_marker (name[sizeof (vptr) - 1]); } /* GCC outputs unnamed structures that are really pointers to member