]> sourceware.org Git - libabigail.git/commit
abg-corpus: remove symbol maps and their setters
authorMatthias Maennich <maennich@google.com>
Wed, 20 May 2020 22:44:01 +0000 (00:44 +0200)
committerDodji Seketeli <dodji@redhat.com>
Fri, 2 Apr 2021 13:48:01 +0000 (15:48 +0200)
commit7851ca2b91eed32aaca7ada835f98055d0a304bc
tree287bb494bfef7ab4b2defe768765df069d68f6f8
parent8bfdb0f5482d23c7d8f01bff24b0b4461ce6cfa2
abg-corpus: remove symbol maps and their setters

With the prework in previous commits, we are now able to drop the
public symbols maps in corpus::priv and replace them by private members
with access through getters. The getters use the new symtab
implementation to generate the maps on the fly. Setters are not required
anymore and are removed. Also remove redundant getters.

We could also remove the getters for the symbol maps and the local
caching variable and leave it all to lookup_symbol, but this is left for
a later change.

* include/abg-corpus.h (corpus::set_fun_symbol_map): Remove
method declaration.
(corpus::set_undefined_fun_symbol_map): Likewise.
(corpus::set_var_symbol_map): Likewise.
(corpus::set_undefined_var_symbol_map): Likewise.
(corpus::get_fun_symbol_map_sptr): Likewise.
(corpus::get_undefined_fun_symbol_map_sptr): Likewise.
(corpus::get_var_symbol_map_sptr): Likewise.
(corpus::get_undefined_var_symbol_map_sptr): Likewise.
* src/abg-corpus-priv.h (corpus::priv::var_symbol_map): make
private and mutable
(corpus::priv::undefined_var_symbol_map): Likewise.
(corpus::priv::fun_symbol_map): Likewise.
(corpus::priv::undefined_fun_symbol_map): Likewise.
(corpus::priv::get_fun_symbol_map): New method declaration.
(corpus::priv::get_undefined_fun_symbol_map): Likewise.
(corpus::priv::get_var_symbol_map): Likewise.
(corpus::priv::get_undefined_var_symbol_map): Likewise.
* src/abg-corpus.cc (corpus::priv::get_fun_symbol_map): New
method implementation.
(corpus::priv::get_undefined_fun_symbol_map): Likewise.
(corpus::priv::get_var_symbol_map): Likewise.
(corpus::priv::get_undefined_var_symbol_map): Likewise.
(corpus::is_empty): depend on symtab only.
(corpus::set_fun_symbol_map): Remove method.
(corpus::set_undefined_fun_symbol_map): Likewise.
(corpus::set_var_symbol_map): Likewise.
(corpus::set_undefined_var_symbol_map): Likewise.
(corpus::get_fun_symbol_map_sptr): Likewise.
(corpus::get_undefined_fun_symbol_map_sptr): Likewise.
(corpus::get_var_symbol_map_sptr): Likewise.
(corpus::get_undefined_var_symbol_map_sptr): Likewise.
(corpus::get_fun_symbol_map): Use corpus::priv proxy method.
(corpus::get_undefined_fun_symbol_map): Likewise.
(corpus::get_var_symbol_map): Likewise.
(corpus::get_undefined_var_symbol_map): Likewise.
* src/abg-dwarf-reader.cc (read_debug_info_into_corpus): Do not
set corpus symbol maps anymore.
* src/abg-reader.cc (read_corpus_from_input): Likewise.
* tests/test-symtab.cc (assert_symbol_count): Do not access the
corpus symbol maps through sptr anymore.
* tests/data/test-read-dwarf/PR25007-sdhci.ko.abi: Adjust
expected test output.

Reviewed-by: Giuliano Procida <gprocida@google.com>
Reviewed-by: Dodji Seketeli <dodji@seketeli.org>
Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-corpus.h
src/abg-corpus-priv.h
src/abg-corpus.cc
src/abg-dwarf-reader.cc
src/abg-reader.cc
tests/data/test-read-dwarf/PR25007-sdhci.ko.abi
tests/test-symtab.cc
This page took 0.048416 seconds and 5 git commands to generate.