[RFA,15/42] Remove merge_symbol_lists

Message ID 20180523045851.11660-16-tom@tromey.com
State New
Headers show
Series
  • Remove globals from buildsym
Related show

Commit Message

Tom Tromey May 23, 2018, 4:58 a.m.
I discovered that merge_symbol_lists is unused, so this removes it.

gdb/ChangeLog
2018-05-22  Tom Tromey  <tom@tromey.com>

	* buildsym.h (merge_symbol_lists): Remove.
	* buildsym.c (merge_symbol_lists): Remove.
---
 gdb/ChangeLog  |  5 +++++
 gdb/buildsym.c | 27 ---------------------------
 gdb/buildsym.h |  3 ---
 3 files changed, 5 insertions(+), 30 deletions(-)

-- 
2.13.6

Comments

Simon Marchi July 8, 2018, 4:54 p.m. | #1
On 2018-05-23 12:58 AM, Tom Tromey wrote:
> I discovered that merge_symbol_lists is unused, so this removes it.


LGTM.

Patch

diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 6fe413be8a..4744d510c3 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -1685,33 +1685,6 @@  record_producer (const char *producer)
   buildsym_compunit->producer = producer;
 }
 
-/* Merge the first symbol list SRCLIST into the second symbol list
-   TARGETLIST by repeated calls to add_symbol_to_list().  This
-   procedure "frees" each link of SRCLIST by adding it to the
-   free_pendings list.  Caller must set SRCLIST to a null list after
-   calling this function.
-
-   Void return.  */
-
-void
-merge_symbol_lists (struct pending **srclist, struct pending **targetlist)
-{
-  int i;
-
-  if (!srclist || !*srclist)
-    return;
-
-  /* Merge in elements from current link.  */
-  for (i = 0; i < (*srclist)->nsyms; i++)
-    add_symbol_to_list ((*srclist)->symbol[i], targetlist);
-
-  /* Recurse on next.  */
-  merge_symbol_lists (&(*srclist)->next, targetlist);
-
-  /* "Free" the current link.  */
-  (*srclist)->next = free_pendings;
-  free_pendings = (*srclist);
-}
 
 
 /* See buildsym.h.  */
diff --git a/gdb/buildsym.h b/gdb/buildsym.h
index f70777946a..d0943456cd 100644
--- a/gdb/buildsym.h
+++ b/gdb/buildsym.h
@@ -236,9 +236,6 @@  extern void record_debugformat (const char *format);
 
 extern void record_producer (const char *producer);
 
-extern void merge_symbol_lists (struct pending **srclist,
-				struct pending **targetlist);
-
 /* Set the name of the last source file.  NAME is copied by this
    function.  */