Assert that only decls with elf symbols are part of comparison

* src/abg-corpus.cc (corpus::priv::build_public_decl_table): Assert
	that when read from DWARF, only decls with elf symbols are part of
	the public decls table.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2014-10-02 10:15:00 +02:00
parent d5977429c8
commit 59a6b48609
1 changed files with 6 additions and 0 deletions

View File

@ -642,6 +642,9 @@ corpus::priv::build_public_decl_table()
if (!v.fn_is_in_map(n))
{
assert((origin_ == DWARF_ORIGIN
&& (*i)->get_is_in_public_symbol_table())
|| origin_ != DWARF_ORIGIN);
fns.push_back(*i);
v.add_fn_to_map(n, *i);
}
@ -664,6 +667,9 @@ corpus::priv::build_public_decl_table()
if (!v.var_is_in_map(n))
{
assert((origin_ == DWARF_ORIGIN
&& (*i)->get_is_in_public_symbol_table())
|| origin_ != DWARF_ORIGIN);
vars.push_back(*i);
v.add_var_to_map(n, *i);
}