From: Tom Tromey Date: Sun, 18 Jan 2026 17:37:46 +0000 (-0700) Subject: Remove buildsym_compunit::free_pending X-Git-Tag: binutils-2_46~193 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a7086eeea163eed8cd8069531b7882ffdf80776;p=thirdparty%2Fbinutils-gdb.git Remove buildsym_compunit::free_pending buildsym_compunit::free_pending is only called from a single spot in buildsym.c, so let's inline it and remove the method. Approved-By: Simon Marchi --- diff --git a/gdb/buildsym.c b/gdb/buildsym.c index f5cc5aed908..7a468076c54 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -373,7 +373,9 @@ buildsym_compunit::make_blockvector () for (next = m_pending_blocks; next; next = next->next) blockvector->set_block (--i, next->block); - free_pending_blocks (); + /* Finished with the pending blocks now. */ + m_pending_block_obstack.clear (); + m_pending_blocks = nullptr; /* If we needed an address map for this symtab, record it in the blockvector. */ diff --git a/gdb/buildsym.h b/gdb/buildsym.h index 031c876a139..1adfefa98e4 100644 --- a/gdb/buildsym.h +++ b/gdb/buildsym.h @@ -165,14 +165,6 @@ struct buildsym_compunit struct macro_table *get_macro_table (); - /* This function is called to discard any pending blocks. */ - - void free_pending_blocks () - { - m_pending_block_obstack.clear (); - m_pending_blocks = nullptr; - } - struct block *finish_block (struct symbol *symbol, struct pending_block *old_blocks, const struct dynamic_prop *static_link,