Canonicalize function types

This speeds up comparison of function types.

	* src/abg-dwarf-reader.cc (build_function_decl): Call
	maybe_canonicalize_type to canonicalize the function type.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2015-03-10 18:58:29 +01:00
parent 43c227f4fd
commit 8ccea7f315
1 changed files with 7 additions and 0 deletions

View File

@ -130,6 +130,11 @@ die_location_address(Dwarf_Die* die,
Dwarf_Addr& address, Dwarf_Addr& address,
bool& is_tls_address); bool& is_tls_address);
static void
maybe_canonicalize_type(Dwarf_Off die_offset,
bool in_alt_di,
read_context& ctxt);
/// Convert an elf symbol type (given by the ELF{32,64}_ST_TYPE /// Convert an elf symbol type (given by the ELF{32,64}_ST_TYPE
/// macros) into an elf_symbol::type value. /// macros) into an elf_symbol::type value.
/// ///
@ -6977,6 +6982,8 @@ build_function_decl(read_context& ctxt,
is_in_alt_di, is_in_alt_di,
result->get_type()); result->get_type());
maybe_canonicalize_type(dwarf_dieoffset(die), is_in_alt_di, ctxt);
return result; return result;
} }