* [pushed] Remove unnecessary cast
@ 2023-03-22 19:23 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-03-22 19:23 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
I found an upcast from template_symbol to symbol. This was necessary
long ago, but since symbols use inheritance now, it is not. This
patch removes it. Tested by rebuilding.
---
gdb/dwarf2/read.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 3fc23e2d43f..c9208a097bf 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -10083,8 +10083,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
gdb_assert (cu->get_builder () != nullptr);
newobj = cu->get_builder ()->push_context (0, lowpc);
- newobj->name = new_symbol (die, read_type_die (die, cu), cu,
- (struct symbol *) templ_func);
+ newobj->name = new_symbol (die, read_type_die (die, cu), cu, templ_func);
if (dwarf2_flag_true_p (die, DW_AT_main_subprogram, cu))
set_objfile_main_name (objfile, newobj->name->linkage_name (),
--
2.39.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-22 19:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-22 19:23 [pushed] Remove unnecessary cast Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).