]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove buildsym_compunit::free_pending
authorTom Tromey <tom@tromey.com>
Sun, 18 Jan 2026 17:37:46 +0000 (10:37 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 20 Jan 2026 02:44:08 +0000 (19:44 -0700)
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 <simon.marchi@efficios.com>
gdb/buildsym.c
gdb/buildsym.h

index f5cc5aed908792fe0ec09692f7752b744cb6c06c..7a468076c549b947f5d9b591790c8ee9472b87ea 100644 (file)
@@ -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.  */
index 031c876a1399629b970d9038037fff9ea0091a39..1adfefa98e4d295788d6af6e31cc91f55b583eb3 100644 (file)
@@ -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,