mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-03 07:52:04 +00:00
dwarf-reader: Avoid duplicating union members
The DWARF from some C++ binaries represents unions in a "piece wise" fashion. When dealing with those unions, we need to avoid adding the same member twice, just like what we do for classes. * src/abg-dwarf-reader.cc (add_or_update_union_type): Do not add an union member that already exists in the union. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
a13e387f23
commit
28c17a4239
@ -13582,6 +13582,9 @@ add_or_update_union_type(reader& rdr,
|
||||
if (n.empty() && result->find_data_member(dm))
|
||||
continue;
|
||||
|
||||
if (!n.empty() && lookup_var_decl_in_scope(n, result))
|
||||
continue;
|
||||
|
||||
result->add_data_member(dm, access, /*is_laid_out=*/true,
|
||||
/*is_static=*/false,
|
||||
offset_in_bits);
|
||||
|
Loading…
Reference in New Issue
Block a user