]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove buildsym_compunit::release_macros
authorTom Tromey <tom@tromey.com>
Sun, 18 Jan 2026 17:36:52 +0000 (10:36 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 20 Jan 2026 02:44:07 +0000 (19:44 -0700)
buildsym_compunit::release_macros 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 f7386de8d38d02275795a26d08af33bc8a509aec..f5cc5aed908792fe0ec09692f7752b744cb6c06c 100644 (file)
@@ -808,7 +808,8 @@ buildsym_compunit::end_compunit_symtab_from_static_block
 
   blockvector->global_block ()->set_compunit (cu);
 
-  cu->set_macro_table (release_macros ());
+  cu->set_macro_table (m_pending_macros);
+  m_pending_macros = nullptr;
 
   /* Default any symbols without a specified symtab to the primary symtab.  */
   {
index 2ec7e47d4931b3a5645191974d65be30fc71519f..031c876a1399629b970d9038037fff9ea0091a39 100644 (file)
@@ -165,13 +165,6 @@ struct buildsym_compunit
 
   struct macro_table *get_macro_table ();
 
-  struct macro_table *release_macros ()
-  {
-    struct macro_table *result = m_pending_macros;
-    m_pending_macros = nullptr;
-    return result;
-  }
-
   /* This function is called to discard any pending blocks.  */
 
   void free_pending_blocks ()