aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-03-22 13:22:24 -0600
committerTom Tromey <tromey@adacore.com>2023-03-22 13:22:24 -0600
commit52ec426b5eb6a323d61a5049fd46a6117eecc6f5 (patch)
tree7a4401c8d580e9e2500784151a500731130ab975
parent1c3b2b83dc2a289d3b5a7be4838c8ce3977f4124 (diff)
downloadgdb-52ec426b5eb6a323d61a5049fd46a6117eecc6f5.zip
gdb-52ec426b5eb6a323d61a5049fd46a6117eecc6f5.tar.gz
gdb-52ec426b5eb6a323d61a5049fd46a6117eecc6f5.tar.bz2
Remove unnecessary cast
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.
-rw-r--r--gdb/dwarf2/read.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 3fc23e2..c9208a0 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 (),