From: Tom Tromey Date: Sun, 18 Jan 2026 17:26:02 +0000 (-0700) Subject: Remove unused methods from buildsym_compunit X-Git-Tag: binutils-2_46~195 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa6a103f20147d22a7400943bc1befb21a986d3e;p=thirdparty%2Fbinutils-gdb.git Remove unused methods from buildsym_compunit A few methods of buildsym_compunit are now unused and can be removed. Approved-By: Simon Marchi --- diff --git a/gdb/buildsym.c b/gdb/buildsym.c index 3c1d6f84ce9..f7386de8d38 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -478,27 +478,6 @@ buildsym_compunit::start_subfile (const char *name, const char *name_for_id) m_subfiles = subfile.release (); } -/* Handle the N_BINCL and N_EINCL symbol types that act like N_SOL for - switching source files (different subfiles, as we call them) within - one object file, but using a stack rather than in an arbitrary - order. */ - -void -buildsym_compunit::push_subfile () -{ - gdb_assert (m_current_subfile != NULL); - gdb_assert (!m_current_subfile->name.empty ()); - m_subfile_stack.push_back (m_current_subfile->name.c_str ()); -} - -const char * -buildsym_compunit::pop_subfile () -{ - gdb_assert (!m_subfile_stack.empty ()); - const char *name = m_subfile_stack.back (); - m_subfile_stack.pop_back (); - return name; -} /* Add a linetable entry for line number LINE and address PC to the line vector for SUBFILE. */ diff --git a/gdb/buildsym.h b/gdb/buildsym.h index 3ed4bd5f533..2ec7e47d493 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -198,17 +198,6 @@ struct buildsym_compunit existing subfiles). It can be equal to NAME if NAME follows that rule. */ void start_subfile (const char *name, const char *name_for_id); - /* Same as above, but passes NAME for NAME_FOR_ID. */ - - void start_subfile (const char *name) - { - return start_subfile (name, name); - } - - void push_subfile (); - - const char *pop_subfile (); - void record_line (struct subfile *subfile, int line, unrelocated_addr pc, linetable_entry_flags flags);