XML writer: track emitted types by bare pointer

This is a performance and safety improvement made possible by the
previous changes which ensure that the same pointers are inserted and
looked up.

This essentially removes the now unnecessary deep comparison.

	* src/abg-writer.cc (type_ptr_set_type): Change typedef
	container type to use default equality and hashing for pointer
	keys.
	(fn_type_ptr_set_type): Likewise.

Reviewed-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Matthias Maennich 2021-12-03 11:46:21 +00:00 committed by Dodji Seketeli
parent eab1463fea
commit 4565679f3d

View File

@ -124,14 +124,10 @@ typedef unordered_map<type_base*,
abigail::diff_utils::deep_ptr_eq_functor> type_ptr_map;
// A convenience typedef for a set of type_base*.
typedef unordered_set<const type_base*, type_hasher,
abigail::diff_utils::deep_ptr_eq_functor>
type_ptr_set_type;
typedef std::unordered_set<const type_base*> type_ptr_set_type;
/// A convenience typedef for a set of function type*.
typedef unordered_set<function_type*, type_hasher,
abigail::diff_utils::deep_ptr_eq_functor>
fn_type_ptr_set_type;
typedef std::unordered_set<function_type*> fn_type_ptr_set_type;
typedef unordered_map<shared_ptr<function_tdecl>,
string,