Use canonical types hash maps for type IDs in abixml writer
authorDodji Seketeli <dodji@redhat.com>
Wed, 24 Apr 2019 15:52:39 +0000 (17:52 +0200)
committerDodji Seketeli <dodji@redhat.com>
Wed, 24 Apr 2019 15:52:39 +0000 (17:52 +0200)
commiteafa0974331eb59b8c8163667359e22f0462be61
treef3891711df662a7c5014bf7c4e8284e19b9d088b
parent04d61a726d32cad0d2abb54b78f2cda90e20148b
Use canonical types hash maps for type IDs in abixml writer

This patch stores canonical types in the hash maps that are used in
the abixml writer to compute the type IDs.  This limits the
possibility that two types that are equivalent (especially when one is
a declaration-only class) end-up in the same abixml.

* src/abg-writer.cc (write_context::{type_has_existing_id,
get_id_for_type}): Save the canonical type of the type in the map,
not the type itself.
(write_context::{type_is_emitted}): Use the canonical type rather
than the type itself.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-writer.cc
tests/data/test-read-dwarf/test9-pr18818-clang.so.abi