From patchwork Mon May 11 15:27:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Matthias_M=C3=A4nnich?= X-Patchwork-Id: 39229 From: maennich@google.com (Matthias Maennich) Date: Mon, 11 May 2020 17:27:08 +0200 Subject: [PATCH] dwarf-reader: read_context: drop some unused accessor methods Message-ID: <20200511152708.34098-1-maennich@google.com> 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 Signed-off-by: Matthias Maennich Acked-by: Dodji Seketeli --- 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