[06/15] Remove dict_empty/mdict_empty

Message ID 20191125052655.22696-7-simon.marchi@efficios.com
State New
Headers show
Series
  • Enable -Wmissing-declarations diagnostic
Related show

Commit Message

Simon Marchi Nov. 25, 2019, 5:26 a.m.
These functions are not used in the code base, remove them.

gdb/ChangeLog:

	* dictionary.c (dict_empty, mdict_empty): Remove.
	* dictionary.c (mdict_empty): Remove.

Change-Id: I4c1b08c730f6790b2f3d28b680607618e3c08e48
---
 gdb/dictionary.c | 24 ------------------------
 gdb/dictionary.h |  4 ----
 2 files changed, 28 deletions(-)

-- 
2.24.0

Patch

diff --git a/gdb/dictionary.c b/gdb/dictionary.c
index 939f32b59afb..0d13370b7269 100644
--- a/gdb/dictionary.c
+++ b/gdb/dictionary.c
@@ -508,16 +508,6 @@  dict_size (const struct dictionary *dict)
    implemented generically by means of the vtable.  Typically, they're
    rarely used.  */
 
-/* Test to see if DICT is empty.  */
-
-static int
-dict_empty (struct dictionary *dict)
-{
-  struct dict_iterator iter;
-
-  return (dict_iterator_first (dict, &iter) == NULL);
-}
-
 
 /* The functions implementing the dictionary interface.  */
 
@@ -1283,17 +1273,3 @@  mdict_size (const struct multidictionary *mdict)
 
   return size;
 }
-
-/* See dictionary.h.  */
-
-bool
-mdict_empty (const struct multidictionary *mdict)
-{
-  for (unsigned short idx = 0; idx < mdict->n_allocated_dictionaries; ++idx)
-    {
-      if (!dict_empty (mdict->dictionaries[idx]))
-	return false;
-    }
-
-  return true;
-}
diff --git a/gdb/dictionary.h b/gdb/dictionary.h
index e6481cd38ce9..9a7739b7c10d 100644
--- a/gdb/dictionary.h
+++ b/gdb/dictionary.h
@@ -93,10 +93,6 @@  extern void mdict_add_symbol (struct multidictionary *mdict,
 extern void mdict_add_pending (struct multidictionary *mdict,
 			       const struct pending *symbol_list);
 
-/* Is the multidictionary empty?  */
-
-extern int mdict_empty (struct multidictionary *mdict);
-
 /* A type containing data that is used when iterating over all symbols
    in a dictionary.  Don't ever look at its innards; this type would
    be opaque if we didn't need to be able to allocate it on the