mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-22 09:49:59 +00:00
ed5cd14a34
* include/abg-fwd.h (has_scope): Delete the overloads for type_base. (get_member_is_static): Add an overload for decl_base*. ({is,get,set}_data_member,{get_,set}_data_member_is_laid_out) ({get,set}_data_member_offset): New access declarations. * include/abg-ir.h (class context_rel): Move up. (decl_base::set_context_rel): New definition. (class dm_context_rel): New type. (decl_base::hash_as_member): Remove. (var_decl::set_scope): Declare new virtual member. (class_decl::data_member): Remove. (ir_node_visitor::visit): Remove the overload for class_decl::data_member. (represent_data_member): Remove the represent overload for class_decl::data_member into this. Make it take a var_decl. (represent): Change the overload that takes two class_decl::data_member take two var_decl. And adjust it. (class_diff::report): Adjust. * src/abg-corpus.cc (symtab_build_visitor_type::visit): Remove the overload that takes a class_decl::data_member*. Adjust the overload that takes a var_decl to recognize (static) data members. * src/abg-dwarf-reader.cc (build_translation_unit_and_add_to_ir) (build_class_type_and_add_to_ir, build_ir_node_from_die): Adjust. * src/abg-hash.cc (var_decl:#️⃣:operator()): Adjust. (class_decl::data_member:#️⃣:operator()): Remove. (decl_base:#️⃣:operator()): Take the context relationship in account here. (decl_base::hash_as_member::operator()): Remove. ({enum_type_decl,typedef_decl}:#️⃣:operator()): Adjust. (class_decl::member_function:#️⃣:operator()): Adjust. (type_base::dynamic_hash::operator()): Adjust. * src/abg-ir.cc (dm_context_rel::~dm_context_rel): New definition. (has_scope): Remove overload for type_base. (get_member_is_static): New overload for decl_base*. (is_data_member): New function definition. ({get,set}_data_member_{offset,is_laid_out}): Define new accessors. (var_decl::set_scope): Define new member function. Make this set a dm_context_rel as the context relationship. (var_decl::operator==): Adjust to take in account the new data member relationship. (class_decl::class_decl): Adjust. (class_decl::insert_member_decl): Adjust. (class_decl::add_data_member): Remove the overload for class_decl::data_member. (class_decl::add_data_member): Adjust the overload for var_decl. (operator==): Remove overload for class_decl::data_member*. (class_decl::data_member::operator==): Likewise. (ir_node_visitor::visit): Remove overload for class_decl::data_member. * src/abg-writer.cc (write_layout_offset, write_class_decl): Adjust. * tests/data/test-read-write/test20.xml: Adjust. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
88 lines
6.5 KiB
XML
88 lines
6.5 KiB
XML
<abi-instr version='1.0' path='data/test-read-write/test20.xml'>
|
|
<type-decl name='void' alignment-in-bits='8' id='type-id-1'/>
|
|
<function-decl name='foo' mangled-name='_Z3foov' filepath='../../prtests/test9.cc' line='78' column='1' visibility='default' binding='global' size-in-bits='8' alignment-in-bits='8'>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-2'/>
|
|
<class-decl name='B0' visibility='default' is-declaration-only='yes' id='type-id-3'/>
|
|
<pointer-type-def type-id='type-id-3' size-in-bits='64' alignment-in-bits='64' id='type-id-4'/>
|
|
<class-decl name='B0' size-in-bits='32' alignment-in-bits='32' visibility='default' filepath='../../prtests/test9.cc' line='1' column='7' def-of-decl-id='type-id-3' id='type-id-5'>
|
|
<data-member access='private' layout-offset-in-bits='0'>
|
|
<var-decl name='m0' type-id='type-id-2' visibility='default' filepath='../../prtests/test9.cc' line='3' column='7'/>
|
|
</data-member>
|
|
<member-function access='public'>
|
|
<function-decl name='__base_ctor ' mangled-name='_ZN2B0C2Ev' filepath='../../prtests/test9.cc' line='7' column='3' declared-inline='yes' visibility='default' binding='weak' size-in-bits='8' alignment-in-bits='8'>
|
|
<parameter type-id='type-id-4'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</member-function>
|
|
<member-function access='public'>
|
|
<function-decl name='__comp_ctor ' mangled-name='_ZN2B0C1Ev' filepath='../../prtests/test9.cc' line='7' column='3' declared-inline='yes' visibility='default' binding='weak' size-in-bits='8' alignment-in-bits='8'>
|
|
<parameter type-id='type-id-4'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</member-function>
|
|
</class-decl>
|
|
<class-decl name='B1' size-in-bits='32' alignment-in-bits='32' visibility='default' filepath='../../prtests/test9.cc' line='20' column='7' id='type-id-6'>
|
|
<data-member access='private' layout-offset-in-bits='0'>
|
|
<var-decl name='m0' type-id='type-id-2' visibility='default' filepath='../../prtests/test9.cc' line='22' column='7'/>
|
|
</data-member>
|
|
<member-function access='public'>
|
|
<function-decl name='__base_ctor ' mangled-name='_ZN2B1C2Ev' filepath='../../prtests/test9.cc' line='26' column='3' declared-inline='yes' visibility='default' binding='weak' size-in-bits='8' alignment-in-bits='8'>
|
|
<parameter type-id='type-id-7'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</member-function>
|
|
<member-function access='public'>
|
|
<function-decl name='__comp_ctor ' mangled-name='_ZN2B1C1Ev' filepath='../../prtests/test9.cc' line='26' column='3' declared-inline='yes' visibility='default' binding='weak' size-in-bits='8' alignment-in-bits='8'>
|
|
<parameter type-id='type-id-7'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</member-function>
|
|
</class-decl>
|
|
<pointer-type-def type-id='type-id-6' size-in-bits='64' alignment-in-bits='64' id='type-id-7'/>
|
|
<class-decl name='B2' visibility='default' is-declaration-only='yes' id='type-id-8'/>
|
|
<pointer-type-def type-id='type-id-8' size-in-bits='64' alignment-in-bits='64' id='type-id-9'/>
|
|
<class-decl name='B2' size-in-bits='32' alignment-in-bits='32' visibility='default' filepath='../../prtests/test9.cc' line='39' column='7' def-of-decl-id='type-id-8' id='type-id-10'>
|
|
<data-member access='private' layout-offset-in-bits='0'>
|
|
<var-decl name='m0' type-id='type-id-2' visibility='default' filepath='../../prtests/test9.cc' line='41' column='7'/>
|
|
</data-member>
|
|
<member-function access='public'>
|
|
<function-decl name='__base_ctor ' mangled-name='_ZN2B2C2Ev' filepath='../../prtests/test9.cc' line='45' column='3' declared-inline='yes' visibility='default' binding='weak' size-in-bits='8' alignment-in-bits='8'>
|
|
<parameter type-id='type-id-9'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</member-function>
|
|
<member-function access='public'>
|
|
<function-decl name='__comp_ctor ' mangled-name='_ZN2B2C1Ev' filepath='../../prtests/test9.cc' line='45' column='3' declared-inline='yes' visibility='default' binding='weak' size-in-bits='8' alignment-in-bits='8'>
|
|
<parameter type-id='type-id-9'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</member-function>
|
|
</class-decl>
|
|
<class-decl name='S' visibility='default' is-declaration-only='yes' id='type-id-11'/>
|
|
<pointer-type-def type-id='type-id-11' size-in-bits='64' alignment-in-bits='64' id='type-id-12'/>
|
|
<class-decl name='S' size-in-bits='192' alignment-in-bits='64' visibility='default' filepath='../../prtests/test9.cc' line='58' column='7' id='type-id-13'>
|
|
<base-class access='public' layout-offset-in-bits='64' type-id='type-id-3'/>
|
|
<base-class access='public' layout-offset-in-bits='96' type-id='type-id-6'/>
|
|
<base-class access='private' layout-offset-in-bits='160' is-virtual='yes' type-id='type-id-10'/>
|
|
<data-member access='private' layout-offset-in-bits='128'>
|
|
<var-decl name='m0' type-id='type-id-2' visibility='default' filepath='../../prtests/test9.cc' line='60' column='7'/>
|
|
</data-member>
|
|
<member-function access='public'>
|
|
<function-decl name='__comp_ctor ' mangled-name='_ZN1SC1Ev' filepath='../../prtests/test9.cc' line='64' column='3' declared-inline='yes' visibility='default' binding='weak' size-in-bits='8' alignment-in-bits='8'>
|
|
<parameter type-id='type-id-12'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</member-function>
|
|
</class-decl>
|
|
<class-decl name='__class_type_info_pseudo' size-in-bits='128' alignment-in-bits='64' visibility='default' id='type-id-14'/>
|
|
<qualified-type-def type-id='type-id-14' const='yes' id='type-id-15'/>
|
|
<var-decl name='_ZTI2B0' type-id='type-id-15' mangled-name='_ZTI2B0' visibility='default' binding='weak' filepath='../../prtests/test9.cc' line='81' column='1'/>
|
|
<var-decl name='_ZTI2B2' type-id='type-id-15' mangled-name='_ZTI2B2' visibility='default' binding='weak' filepath='../../prtests/test9.cc' line='81' column='1'/>
|
|
<var-decl name='_ZTI2B1' type-id='type-id-15' mangled-name='_ZTI2B1' visibility='default' binding='weak' filepath='../../prtests/test9.cc' line='81' column='1'/>
|
|
<class-decl name='__vmi_class_type_info_pseudo3' size-in-bits='576' alignment-in-bits='64' visibility='default' id='type-id-16'/>
|
|
<qualified-type-def type-id='type-id-16' const='yes' id='type-id-17'/>
|
|
<var-decl name='_ZTI1S' type-id='type-id-17' mangled-name='_ZTI1S' visibility='default' binding='weak' filepath='../../prtests/test9.cc' line='58' column='7'/>
|
|
</abi-instr>
|