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>
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I474b160dcc2577bfe7027dc59dbcc8bc4ea85260
7 files changed