public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] dwarf-reader: read_context: drop some unused accessor methods
@ 2020-05-11 15:27 Matthias Maennich
  2020-05-13  9:53 ` Dodji Seketeli
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Maennich @ 2020-05-11 15:27 UTC (permalink / raw)
  To: libabigail; +Cc: dodji, gprocida, kernel-team, maennich

Those methods were effectively dead code. Hence only keep the actually
used accessors around:
  const string_elf_symbols_map_sptr& some_sptr();
  string_elf_symbols_map_sptr& some();

	* src/abg-dwarf-reader.cc (read_context::fun_syms_sptr): Delete method.
	(read_context::fun_syms): Likewise.
	(read_context::var_syms_sptr): Likewise.
	(read_context::var_syms): Likewise.
	(read_context::undefined_fun_syms_sptr): Likewise.
	(read_context::undefined_fun_syms): Likewise. Both overloads.
	(read_context::undefined_var_syms_sptr): Likewise.
	(read_context::undefined_var_syms): Likewise. Both overloads.

Reviewed-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
---
 src/abg-dwarf-reader.cc | 108 ----------------------------------------
 1 file changed, 108 deletions(-)

diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
index 638375541ef7..5024deb3f857 100644
--- a/src/abg-dwarf-reader.cc
+++ b/src/abg-dwarf-reader.cc
@@ -6026,26 +6026,6 @@ public:
     return fun_syms_;
   }
 
-  /// Getter for the map of function symbols (name -> sym).
-  ///
-  /// @return a shared pointer to the map of function symbols.
-  string_elf_symbols_map_sptr&
-  fun_syms_sptr()
-  {
-    maybe_load_symbol_maps();
-    return fun_syms_;
-  }
-
-  /// Getter for the map of function symbols (name -> sym).
-  ///
-  /// @return a reference to the map of function symbols.
-  const string_elf_symbols_map_type&
-  fun_syms() const
-  {
-    maybe_load_symbol_maps();
-    return *fun_syms_;
-  }
-
   /// Getter for the map of function symbols (name -> sym).
   ///
   /// @return a reference to the map of function symbols.
@@ -6066,26 +6046,6 @@ public:
     return var_syms_;
   }
 
-  /// Getter for the map of variable symbols (name -> sym)
-  ///
-  /// @return a shared pointer to the map of variable symbols.
-  string_elf_symbols_map_sptr
-  var_syms_sptr()
-  {
-    maybe_load_symbol_maps();
-    return var_syms_;
-  }
-
-  /// Getter for the map of variable symbols (name -> sym)
-  ///
-  /// @return a reference to the map of variable symbols.
-  const string_elf_symbols_map_type&
-  var_syms() const
-  {
-    maybe_load_symbol_maps();
-    return *var_syms_;
-  }
-
   /// Getter for the map of variable symbols (name -> sym)
   ///
   /// @return a reference to the map of variable symbols.
@@ -6108,40 +6068,6 @@ public:
     return undefined_fun_syms_;
   }
 
-  /// Getter for the map of undefined function symbols (name -> vector
-  /// of symbols).
-  ///
-  /// @return a (smart) pointer to the map of undefined function
-  /// symbols.
-  string_elf_symbols_map_sptr&
-  undefined_fun_syms_sptr()
-  {
-    maybe_load_symbol_maps();
-    return undefined_fun_syms_;
-  }
-
-  /// Getter for the map of undefined function symbols (name -> vector
-  /// of symbols).
-  ///
-  /// @return a reference to the map of undefined function symbols.
-  const string_elf_symbols_map_type&
-  undefined_fun_syms() const
-  {
-    maybe_load_symbol_maps();
-    return *undefined_fun_syms_;
-  }
-
-  /// Getter for the map of undefined function symbols (name -> vector
-  /// of symbols).
-  ///
-  /// @return a reference to the map of undefined function symbols.
-  string_elf_symbols_map_type&
-  undefined_fun_syms()
-  {
-    maybe_load_symbol_maps();
-    return *undefined_fun_syms_;
-  }
-
   /// Getter for the map of undefined variable symbols (name -> vector
   /// of symbols).
   ///
@@ -6154,40 +6080,6 @@ public:
     return undefined_var_syms_;
   }
 
-  /// Getter for the map of undefined variable symbols (name -> vector
-  /// of symbols).
-  ///
-  /// @return a (smart) pointer to the map of undefined variable
-  /// symbols.
-  string_elf_symbols_map_sptr&
-  undefined_var_syms_sptr()
-  {
-    maybe_load_symbol_maps();
-    return undefined_var_syms_;
-  }
-
-  /// Getter for the map of undefined variable symbols (name -> vector
-  /// of symbols).
-  ///
-  /// @return a reference to the map of undefined variable symbols.
-  const string_elf_symbols_map_type&
-  undefined_var_syms() const
-  {
-    maybe_load_symbol_maps();
-    return *undefined_var_syms_;
-  }
-
-  /// Getter for the map of undefined variable symbols (name -> vector
-  /// of symbols).
-  ///
-  /// @return a reference to the map of undefined variable symbols.
-  string_elf_symbols_map_type&
-  undefined_var_syms()
-  {
-    maybe_load_symbol_maps();
-    return *undefined_var_syms_;
-  }
-
   /// Getter for the set of addresses of function symbols that are
   /// explicitely exported, for a linux kernel (module) binary.  These
   /// are the addresses of function symbols present in the __ksymtab
-- 
2.26.2.645.ge9eca65c58-goog


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] dwarf-reader: read_context: drop some unused accessor methods
  2020-05-11 15:27 [PATCH] dwarf-reader: read_context: drop some unused accessor methods Matthias Maennich
@ 2020-05-13  9:53 ` Dodji Seketeli
  0 siblings, 0 replies; 2+ messages in thread
From: Dodji Seketeli @ 2020-05-13  9:53 UTC (permalink / raw)
  To: Matthias Maennich; +Cc: libabigail, gprocida, kernel-team

Matthias Maennich <maennich@google.com> a écrit:

> Those methods were effectively dead code. Hence only keep the actually
> used accessors around:
>   const string_elf_symbols_map_sptr& some_sptr();
>   string_elf_symbols_map_sptr& some();
>
> 	* src/abg-dwarf-reader.cc (read_context::fun_syms_sptr): Delete method.
> 	(read_context::fun_syms): Likewise.
> 	(read_context::var_syms_sptr): Likewise.
> 	(read_context::var_syms): Likewise.
> 	(read_context::undefined_fun_syms_sptr): Likewise.
> 	(read_context::undefined_fun_syms): Likewise. Both overloads.
> 	(read_context::undefined_var_syms_sptr): Likewise.
> 	(read_context::undefined_var_syms): Likewise. Both overloads.
>
> Reviewed-by: Giuliano Procida <gprocida@google.com>
> Signed-off-by: Matthias Maennich <maennich@google.com>
Acked-by: Dodji Seketeli <dodji@seketeli.org>

Applied to master, thanks.

Cheers,


-- 
		Dodji

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-13  9:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 15:27 [PATCH] dwarf-reader: read_context: drop some unused accessor methods Matthias Maennich
2020-05-13  9:53 ` Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).