Fix anonymous union constructed under the wrong context

This patch is second of the series:

    Internal pretty repr of union cannot be flat representation
    Fix anonymous union constructed under the wrong context
    Propagate private type diff category through refs/qualified type diffs

The intent of this series is to fix the bug:

    https://sourceware.org/bugzilla/show_bug.cgi?id=24410
    "Empty change report emitted for libpoppler-qt5.so.1.18.0"

What happens here is that when the DWARF reader sees an anonymous
union/struct, it can mistakenly think that it has seen it before
(because the comparison doesn't take the scope of the union/struct
into account), and thus mistakenly represent the union/struct.

The solution implemented by this patch is to take the scope of the
anonymous union/struct into account.

Note that regression tests are all updated in the last patch of the
series.

	* src/abg-dwarf-reader.cc (add_or_update_class_type)
	(add_or_update_union_type): Only reuse anonymous class/union types
	which have the same scope as the current one.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2019-04-05 11:42:38 +02:00
parent 522ac2595d
commit dc84fee0dc