Use pointers not strings in type graph comparison.
During structural comparison of types there is the possibilitiy of
infinite recursion as types can have self-references and there can
be more elaborate mutual references between them.
The current comparison algorithm keeps track of currently seen (struct
and function) types by name. This causes earlier caching of names than
is needed and, more significantly, may result in types comparing equal
unexpectedly. This commit switches to storing their addresses instead.
This change affects some tests which show more diffs than previously.
src/abg-ir.cc: (environment::priv): Change types of
classes_being_compared_ and fn_types_being_compared_ to be
simple sets of pointers.
(function_type::priv::mark_as_being_compared): Just add
address to set.
(function_type::priv::unmark_as_being_compared): Just remove
address from set.
(function_type::priv::comparison_started): Just look up
address in set.
(class_or_union::priv::mark_as_being_compared): Just add
address to set.
(class_or_union::priv::unmark_as_being_compared): Just remove
address from set.
(class_or_union::priv::comparison_started): Just look up
address in set.
* tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt:
Update.
* tests/data/test-diff-pkg/elfutils-libs-0.170-4.el7.x86_64-multiple-sym-vers-report-0.txt:
Update.
* tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-2.txt:
Update.
* tests/data/test-diff-pkg/spice-server-0.12.4-19.el7.x86_64-0.12.8-1.el7.x86_64-report-3.txt:
Update.