]> sourceware.org Git - libabigail.git/commit
Support declaration-only enums in DWARF reader.
authorDodji Seketeli <dodji@redhat.com>
Wed, 10 Jun 2020 11:59:38 +0000 (12:59 +0100)
committerDodji Seketeli <dodji@redhat.com>
Wed, 8 Jul 2020 14:59:56 +0000 (16:59 +0200)
commit9a113ce77139d5b0fd55e0f554d930b38e0a856a
tree6f813e4cc04edd7adb5f6e5a5da30e38cfcaf336
parentdbef379a9678c971a35ad477214464b2f7e08c7a
Support declaration-only enums in DWARF reader.

This patch adds declaration-only handling enums to the DWARF reader.

* src/abg-dwarf-reader.cc (string_enums_map): Define new
convenience typedef.
(read_context::decl_only_enums_map_): Define new data member.
(read_context::{declaration_only_enums,
is_decl_only_enum_scheduled_for_resolution,
resolve_declaration_only_enums}): Define new member functions.
(build_internal_underlying_enum_type_name)
(build_enum_underlying_type): Factorize these functions out of ...
(build_enum_type): ... here.  Detect a decl-only enum and flag it
as such.  If the enum type is decl-only, then set its underlying
type as decl-only as well.
(build_enum_underlying_type): Mark the underlying type as
artificial.
(get_opaque_version_of_type): Make this handle enums as well.  So
make its return type be type_or_decl_base_sptr, rather than just
class_or_union_sptr as it used to be.
(read_debug_info_into_corpus): Add logging to trace decl-only
enums resolution.
(build_ir_node_from_die): Detect when a suppression specification
makes an enum opaque.  In that case, get an opaque version of the
enum type by invoking get_opaque_version_of_type.  Note that
get_opaque_version_of_type doesn't support returning opaque
-- i.e, decl-only enum types -- yet, but this is going to be
handled in a subsequent patch.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Signed-off-by: Giuliano Procida <gprocida@google.com>
src/abg-dwarf-reader.cc
This page took 0.027915 seconds and 5 git commands to generate.