[PATCH] dwarf-reader: read_context: drop some unused accessor methods

Matthias Maennich maennich@google.com
Mon May 11 15:27:08 GMT 2020


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



More information about the Libabigail mailing list