[binutils-gdb] Remove buildsym_compunit::release_macros
Tom Tromey
tromey@sourceware.org
Tue Jan 20 02:45:15 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=98ca7525077412bdc5f6a1fa0d145422b402ddd2
commit 98ca7525077412bdc5f6a1fa0d145422b402ddd2
Author: Tom Tromey <tom@tromey.com>
Date: Sun Jan 18 10:36:52 2026 -0700
Remove buildsym_compunit::release_macros
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>
Diff:
---
gdb/buildsym.c | 3 ++-
gdb/buildsym.h | 7 -------
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index f7386de8d38..f5cc5aed908 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -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. */
{
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index 2ec7e47d493..031c876a139 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -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 ()
More information about the Gdb-cvs
mailing list