reader: Fix building of variadic parameter type

variadic parameter type is not added to its proper scope, leading to
issues down the road.  Fixed thus.

	* src/abg-ir-priv.h (type_topo_comp::operator()): Do not compare
	types using their location anymore.  It's unnecessary (now that
	types are sorted before canonicalization) and it wreaks havoc with
	the new properly constructed variadic parameter types.
	* src/abg-reader.cc (build_ir_node_for_variadic_parameter_type):
	Define new function.  Add variadic parameter type to the global
	scope of the current translation unit.
	(build_function_parameter, build_type_decl): Use the new
	build_ir_node_for_variadic_parameter_type.
	* tests/data/test-read-write/test17.xml: Adjust.
	* tests/data/test-read-write/test19.xml: Likewise.
	* tests/data/test-read-write/test20.xml: Likewise.
	* tests/data/test-read-write/test21.xml: Likewise.
	* tests/data/test-read-write/test22.xml: Likewise.
	* tests/data/test-read-write/test23.xml: Likewise.
	* tests/data/test-read-write/test25.xml: Likewise.
	* tests/data/test-read-write/test26.xml: Likewise.
	* tests/data/test-read-write/test28-without-std-fns-ref.xml:
	Likewise.
	* tests/data/test-read-write/test28-without-std-vars-ref.xml:
	Likewise.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2024-07-05 13:33:57 +02:00
parent 16bc399d58
commit 907f8962a5
12 changed files with 1193 additions and 1174 deletions

View File

@ -1435,15 +1435,6 @@ struct type_topo_comp
if (f == s || !f || !s)
return false;
// If both decls come from an abixml file, keep the order they
// have from that abixml file.
if (is_decl(f) && is_decl(s)
&& ((!f->get_corpus() && !s->get_corpus())
|| (f->get_corpus()->get_origin() == corpus::NATIVE_XML_ORIGIN
&& (s->get_corpus()->get_origin()
== corpus::NATIVE_XML_ORIGIN))))
return compare_using_locations(is_decl(f), is_decl(s));
bool f_is_ptr_ref_or_qual = is_ptr_ref_or_qual_type(f);
bool s_is_ptr_ref_or_qual = is_ptr_ref_or_qual_type(s);

View File

@ -111,6 +111,9 @@ build_ir_node_for_void_type(reader& rdr);
static decl_base_sptr
build_ir_node_for_void_pointer_type(reader& rdr);
static decl_base_sptr
build_ir_node_for_variadic_parameter_type(reader& rdr);
static void
resolve_symbol_aliases(string_elf_symbols_map_sptr& fn_syms,
string_elf_symbols_map_sptr& var_syms,
@ -3545,7 +3548,7 @@ build_function_parameter(reader& rdr, const xmlNodePtr node)
type_base_sptr type;
if (is_variadic)
type = rdr.get_environment().get_variadic_parameter_type();
type = is_type(build_ir_node_for_variadic_parameter_type(rdr));
else
{
ABG_ASSERT(!type_id.empty());
@ -3997,6 +4000,27 @@ build_ir_node_for_void_pointer_type(reader& rdr)
return type_declaration;
}
/// Build the IR node for a variadic parameter type.
///
/// @param rdr the ABIXML reader to use.
///
/// @return the variadic parameter type.
static decl_base_sptr
build_ir_node_for_variadic_parameter_type(reader& rdr)
{
const environment& env = rdr.get_environment();
type_base_sptr t = env.get_variadic_parameter_type();
if (!get_type_scope(t))
{
add_decl_to_scope(is_decl(t),
rdr.get_translation_unit()->get_global_scope());
rdr.schedule_type_for_canonicalization(t);
}
decl_base_sptr type_declaration = get_type_declaration(t);
return type_declaration;
}
/// Build a type_decl from a "type-decl" XML Node.
///
/// @param rdr the context of the parsing.
@ -4067,7 +4091,7 @@ build_type_decl(reader& rdr,
const environment& env = rdr.get_environment();
type_decl_sptr decl;
if (name == env.get_variadic_parameter_type_name())
decl = is_type_decl(env.get_variadic_parameter_type());
decl = is_type_decl(build_ir_node_for_variadic_parameter_type(rdr));
else if (name == "void")
decl = is_type_decl(build_ir_node_for_void_type(rdr));
else

View File

@ -1,15 +1,8 @@
<abi-instr path='data/test-read-write/test17.xml'>
<type-decl name='char' size-in-bits='8' alignment-in-bits='8' id='type-id-1'/>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-2'/>
<type-decl name='unsigned int' size-in-bits='32' alignment-in-bits='32' id='type-id-3'/>
<enum-decl name='E' filepath='../../prtests/test.cc' line='1' column='6' id='type-id-4'>
<underlying-type type-id='type-id-3'/>
<enumerator name='e0' value='0'/>
<enumerator name='e1' value='1'/>
</enum-decl>
<class-decl name='S' size-in-bits='96' alignment-in-bits='32' visibility='default' filepath='../../prtests/test.cc' line='3' column='8' id='type-id-5'>
<class-decl name='S' size-in-bits='96' alignment-in-bits='32' visibility='default' filepath='../../prtests/test.cc' line='3' column='8' id='type-id-2'>
<data-member access='public'>
<var-decl name='m0' type-id='type-id-2' visibility='default' filepath='../../prtests/test.cc' line='5' column='7'/>
<var-decl name='m0' type-id='type-id-3' visibility='default' filepath='../../prtests/test.cc' line='5' column='7'/>
</data-member>
<data-member access='public'>
<var-decl name='m1' type-id='type-id-1' visibility='default' filepath='../../prtests/test.cc' line='6' column='8'/>
@ -19,32 +12,39 @@
</data-member>
<member-function access='public'>
<function-decl name='S' mangled-name='_ZN1SC1Ev *INTERNAL* ' filepath='../../prtests/test.cc' line='9' column='3' declared-inline='yes' visibility='default' binding='global' size-in-bits='8' alignment-in-bits='8'>
<parameter type-id='type-id-6'/>
<return type-id='type-id-7'/>
<parameter type-id='type-id-5'/>
<return type-id='type-id-6'/>
</function-decl>
</member-function>
<member-function access='public'>
<function-decl name='__base_ctor ' mangled-name='_ZN1SC2Ev' filepath='../../prtests/test.cc' line='9' column='3' declared-inline='yes' visibility='default' binding='weak' size-in-bits='8' alignment-in-bits='8'>
<parameter type-id='type-id-6'/>
<return type-id='type-id-7'/>
<parameter type-id='type-id-5'/>
<return type-id='type-id-6'/>
</function-decl>
</member-function>
<member-function access='public'>
<function-decl name='__comp_ctor ' mangled-name='_ZN1SC1Ev' filepath='../../prtests/test.cc' line='9' column='3' declared-inline='yes' visibility='default' binding='weak' size-in-bits='8' alignment-in-bits='8'>
<parameter type-id='type-id-6'/>
<return type-id='type-id-7'/>
<parameter type-id='type-id-5'/>
<return type-id='type-id-6'/>
</function-decl>
</member-function>
<member-function access='public'>
<function-decl name='S' mangled-name='_ZN1SC1ERKS_ *INTERNAL* ' filepath='../../prtests/test.cc' line='15' column='3' declared-inline='yes' visibility='default' binding='global' size-in-bits='8' alignment-in-bits='8'>
<parameter type-id='type-id-6'/>
<parameter type-id='type-id-8'/>
<return type-id='type-id-7'/>
<parameter type-id='type-id-5'/>
<parameter type-id='type-id-7'/>
<return type-id='type-id-6'/>
</function-decl>
</member-function>
</class-decl>
<reference-type-def kind='lvalue' type-id='type-id-5' size-in-bits='64' alignment-in-bits='64' id='type-id-8'/>
<pointer-type-def type-id='type-id-5' size-in-bits='64' alignment-in-bits='64' id='type-id-6'/>
<var-decl name='var' type-id='type-id-5' mangled-name='var' visibility='default' binding='global' filepath='../../prtests/test.cc' line='30' column='3'/>
<type-decl name='void' id='type-id-7'/>
<enum-decl name='E' filepath='../../prtests/test.cc' line='1' column='6' id='type-id-4'>
<underlying-type type-id='type-id-8'/>
<enumerator name='e0' value='0'/>
<enumerator name='e1' value='1'/>
</enum-decl>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-3'/>
<type-decl name='unsigned int' size-in-bits='32' alignment-in-bits='32' id='type-id-8'/>
<reference-type-def kind='lvalue' type-id='type-id-2' size-in-bits='64' alignment-in-bits='64' id='type-id-7'/>
<pointer-type-def type-id='type-id-2' size-in-bits='64' alignment-in-bits='64' id='type-id-5'/>
<var-decl name='var' type-id='type-id-2' mangled-name='var' visibility='default' binding='global' filepath='../../prtests/test.cc' line='30' column='3'/>
<type-decl name='void' id='type-id-6'/>
</abi-instr>

View File

@ -1,22 +1,22 @@
<abi-instr path='data/test-read-write/test19.xml'>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-1'/>
<class-decl name='B0' size-in-bits='32' alignment-in-bits='32' visibility='default' filepath='../../prtests/test9.cc' line='1' column='7' id='type-id-2'>
<class-decl name='B0' size-in-bits='32' alignment-in-bits='32' visibility='default' filepath='../../prtests/test9.cc' line='1' column='7' id='type-id-1'>
<data-member access='private' layout-offset-in-bits='0'>
<var-decl name='m0' type-id='type-id-1' visibility='default' filepath='../../prtests/test9.cc' line='3' column='7'/>
<var-decl name='m0' type-id='type-id-2' visibility='default' filepath='../../prtests/test9.cc' line='3' column='7'/>
</data-member>
</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-3'>
<data-member access='private' layout-offset-in-bits='0'>
<var-decl name='m0' type-id='type-id-1' visibility='default' filepath='../../prtests/test9.cc' line='22' column='7'/>
<var-decl name='m0' type-id='type-id-2' visibility='default' filepath='../../prtests/test9.cc' line='22' column='7'/>
</data-member>
</class-decl>
<class-decl name='S' size-in-bits='96' alignment-in-bits='32' visibility='default' filepath='../../prtests/test9.cc' line='39' column='7' id='type-id-4'>
<base-class access='public' type-id='type-id-2'/>
<base-class access='public' type-id='type-id-1'/>
<base-class access='public' type-id='type-id-3'/>
<data-member access='private' layout-offset-in-bits='64'>
<var-decl name='m0' type-id='type-id-1' visibility='default' filepath='../../prtests/test9.cc' line='41' column='7'/>
<var-decl name='m0' type-id='type-id-2' visibility='default' filepath='../../prtests/test9.cc' line='41' column='7'/>
</data-member>
</class-decl>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-2'/>
<qualified-type-def type-id='type-id-4' const='yes' filepath='../../prtests/test9.cc' line='39' column='7' id='type-id-5'/>
<reference-type-def kind='lvalue' type-id='type-id-5' size-in-bits='64' alignment-in-bits='64' id='type-id-6'/>
<function-decl name='foo' mangled-name='_Z3fooRK1S' filepath='../../prtests/test9.cc' line='59' column='1' visibility='default' binding='global' size-in-bits='8' alignment-in-bits='8'>

View File

@ -1,84 +1,84 @@
<abi-instr path='data/test-read-write/test20.xml'>
<class-decl name='__class_type_info_pseudo' size-in-bits='128' alignment-in-bits='64' visibility='default' id='type-id-1'/>
<class-decl name='__vmi_class_type_info_pseudo3' size-in-bits='576' alignment-in-bits='64' visibility='default' id='type-id-2'/>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-3'/>
<class-decl name='B0' size-in-bits='32' alignment-in-bits='32' visibility='default' filepath='../../prtests/test9.cc' line='1' column='7' 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' id='type-id-1'>
<data-member access='private' layout-offset-in-bits='0'>
<var-decl name='m0' type-id='type-id-3' visibility='default' filepath='../../prtests/test9.cc' line='3' column='7'/>
<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-5'/>
<return type-id='type-id-6'/>
<parameter type-id='type-id-3'/>
<return type-id='type-id-4'/>
</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-5'/>
<return type-id='type-id-6'/>
<parameter type-id='type-id-3'/>
<return type-id='type-id-4'/>
</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-7'>
<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-5'>
<data-member access='private' layout-offset-in-bits='0'>
<var-decl name='m0' type-id='type-id-3' visibility='default' filepath='../../prtests/test9.cc' line='22' column='7'/>
<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-8'/>
<return type-id='type-id-6'/>
<parameter type-id='type-id-6'/>
<return type-id='type-id-4'/>
</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-8'/>
<return type-id='type-id-6'/>
<parameter type-id='type-id-6'/>
<return type-id='type-id-4'/>
</function-decl>
</member-function>
</class-decl>
<class-decl name='B2' size-in-bits='32' alignment-in-bits='32' visibility='default' filepath='../../prtests/test9.cc' line='39' column='7' 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' id='type-id-7'>
<data-member access='private' layout-offset-in-bits='0'>
<var-decl name='m0' type-id='type-id-3' visibility='default' filepath='../../prtests/test9.cc' line='41' column='7'/>
<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-10'/>
<return type-id='type-id-6'/>
<parameter type-id='type-id-8'/>
<return type-id='type-id-4'/>
</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-10'/>
<return type-id='type-id-6'/>
<parameter type-id='type-id-8'/>
<return type-id='type-id-4'/>
</function-decl>
</member-function>
</class-decl>
<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-11'>
<base-class access='public' layout-offset-in-bits='64' type-id='type-id-4'/>
<base-class access='public' layout-offset-in-bits='96' type-id='type-id-7'/>
<base-class access='private' layout-offset-in-bits='160' is-virtual='yes' type-id='type-id-9'/>
<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-9'>
<base-class access='public' layout-offset-in-bits='64' type-id='type-id-1'/>
<base-class access='public' layout-offset-in-bits='96' type-id='type-id-5'/>
<base-class access='private' layout-offset-in-bits='160' is-virtual='yes' type-id='type-id-7'/>
<data-member access='private' layout-offset-in-bits='128'>
<var-decl name='m0' type-id='type-id-3' visibility='default' filepath='../../prtests/test9.cc' line='60' column='7'/>
<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-6'/>
<parameter type-id='type-id-10'/>
<return type-id='type-id-4'/>
</function-decl>
</member-function>
</class-decl>
<pointer-type-def type-id='type-id-4' size-in-bits='64' alignment-in-bits='64' id='type-id-5'/>
<class-decl name='__class_type_info_pseudo' size-in-bits='128' alignment-in-bits='64' visibility='default' id='type-id-11'/>
<class-decl name='__vmi_class_type_info_pseudo3' size-in-bits='576' alignment-in-bits='64' visibility='default' id='type-id-12'/>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-2'/>
<pointer-type-def type-id='type-id-1' size-in-bits='64' alignment-in-bits='64' id='type-id-3'/>
<pointer-type-def type-id='type-id-5' size-in-bits='64' alignment-in-bits='64' id='type-id-6'/>
<pointer-type-def type-id='type-id-7' size-in-bits='64' alignment-in-bits='64' id='type-id-8'/>
<pointer-type-def type-id='type-id-9' size-in-bits='64' alignment-in-bits='64' id='type-id-10'/>
<pointer-type-def type-id='type-id-11' size-in-bits='64' alignment-in-bits='64' id='type-id-12'/>
<qualified-type-def type-id='type-id-1' const='yes' id='type-id-13'/>
<qualified-type-def type-id='type-id-2' const='yes' id='type-id-14'/>
<qualified-type-def type-id='type-id-11' const='yes' id='type-id-13'/>
<qualified-type-def type-id='type-id-12' const='yes' id='type-id-14'/>
<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-6'/>
<return type-id='type-id-4'/>
</function-decl>
<var-decl name='_ZTI2B0' type-id='type-id-13' mangled-name='_ZTI2B0' visibility='default' binding='weak' filepath='../../prtests/test9.cc' line='81' column='1'/>
<var-decl name='_ZTI2B2' type-id='type-id-13' mangled-name='_ZTI2B2' visibility='default' binding='weak' filepath='../../prtests/test9.cc' line='81' column='1'/>
<var-decl name='_ZTI2B1' type-id='type-id-13' mangled-name='_ZTI2B1' visibility='default' binding='weak' filepath='../../prtests/test9.cc' line='81' column='1'/>
<var-decl name='_ZTI1S' type-id='type-id-14' mangled-name='_ZTI1S' visibility='default' binding='weak' filepath='../../prtests/test9.cc' line='58' column='7'/>
<type-decl name='void' id='type-id-6'/>
<type-decl name='void' id='type-id-4'/>
</abi-instr>

View File

@ -1,11 +1,10 @@
<abi-instr path='data/test-read-write/test21.xml'>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-1'/>
<class-decl name='S' size-in-bits='32' alignment-in-bits='32' visibility='default' filepath='simple-class-0.C' line='5' column='8' id='type-id-2'>
<class-decl name='S' size-in-bits='32' alignment-in-bits='32' visibility='default' filepath='simple-class-0.C' line='5' column='8' id='type-id-1'>
<member-type access='public'>
<typedef-decl name='S' type-id='type-id-2' filepath='simple-class-0.C' line='6' column='1' id='type-id-3'/>
<typedef-decl name='S' type-id='type-id-1' filepath='simple-class-0.C' line='6' column='1' id='type-id-2'/>
</member-type>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='m' type-id='type-id-1' visibility='default' filepath='simple-class-0.C' line='7' column='7'/>
<var-decl name='m' type-id='type-id-3' visibility='default' filepath='simple-class-0.C' line='7' column='7'/>
</data-member>
<member-function access='public' constructor='yes'>
<function-decl name='__base_ctor ' mangled-name='_ZN1SC2Ev' filepath='simple-class-0.C' line='13' column='1' visibility='default' binding='global' size-in-bits='8' alignment-in-bits='8'>
@ -34,9 +33,10 @@
</function-decl>
</member-function>
</class-decl>
<reference-type-def kind='lvalue' type-id='type-id-2' size-in-bits='64' alignment-in-bits='64' id='type-id-7'/>
<pointer-type-def type-id='type-id-2' size-in-bits='64' alignment-in-bits='64' id='type-id-4'/>
<qualified-type-def type-id='type-id-2' const='yes' filepath='simple-class-0.C' line='5' column='8' id='type-id-8'/>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-3'/>
<reference-type-def kind='lvalue' type-id='type-id-1' size-in-bits='64' alignment-in-bits='64' id='type-id-7'/>
<pointer-type-def type-id='type-id-1' size-in-bits='64' alignment-in-bits='64' id='type-id-4'/>
<qualified-type-def type-id='type-id-1' const='yes' filepath='simple-class-0.C' line='5' column='8' id='type-id-8'/>
<reference-type-def kind='lvalue' type-id='type-id-8' size-in-bits='64' alignment-in-bits='64' id='type-id-6'/>
<function-decl name='foo' mangled-name='_Z3fooR1S' filepath='simple-class-0.C' line='24' column='1' visibility='default' binding='global' size-in-bits='8' alignment-in-bits='8'>
<parameter type-id='type-id-7'/>

View File

@ -16,5 +16,6 @@
<return type-id='type-id-2'/>
</function-decl>
<var-decl name='global' type-id='type-id-2' visibility='default' filepath='/home/dodji/test-bidw/test-v0.cc' line='2' column='1'/>
<type-decl name='variadic parameter type' id='type-id-5'/>
<type-decl name='void' id='type-id-4'/>
</abi-instr>

View File

@ -16,5 +16,6 @@
<return type-id='type-id-2'/>
</function-decl>
<var-decl name='global' type-id='type-id-2' visibility='default' filepath='/home/dodji/test-bidw/test-v0.cc' line='2' column='1'/>
<type-decl name='variadic parameter type' id='type-id-5'/>
<type-decl name='void' id='type-id-4'/>
</abi-instr>

View File

@ -6,45 +6,45 @@
<array-type-def dimensions='1' type-id='type-id-1' size-in-bits='unknown' alignment-in-bits='8' id='type-id-5'>
<subrange length='unknown' lower-bound='0' upper-bound='0' id='type-id-6'/>
</array-type-def>
<class-decl name='S' size-in-bits='2240' is-struct='yes' visibility='default' id='type-id-7'>
<type-decl name='double' size-in-bits='64' alignment-in-bits='64' id='type-id-7'/>
<array-type-def dimensions='2' type-id='type-id-7' size-in-bits='960' alignment-in-bits='64' id='type-id-8'>
<subrange length='5' lower-bound='0' upper-bound='4' id='type-id-9'/>
<subrange length='3' lower-bound='0' upper-bound='2' id='type-id-10'/>
</array-type-def>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-11'/>
<array-type-def dimensions='1' type-id='type-id-12' size-in-bits='640' alignment-in-bits='64' id='type-id-13'>
<subrange length='10' lower-bound='0' upper-bound='9' id='type-id-14'/>
</array-type-def>
<array-type-def dimensions='1' type-id='type-id-15' size-in-bits='256' alignment-in-bits='64' id='type-id-16'>
<subrange length='4' lower-bound='0' upper-bound='3' id='type-id-17'/>
</array-type-def>
<array-type-def dimensions='1' type-id='type-id-11' size-in-bits='160' alignment-in-bits='32' id='type-id-18'>
<subrange length='5' lower-bound='0' upper-bound='4' id='type-id-9'/>
</array-type-def>
<class-decl name='S' size-in-bits='2240' is-struct='yes' visibility='default' id='type-id-19'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='a' type-id='type-id-8' visibility='default'/>
<var-decl name='a' type-id='type-id-18' visibility='default'/>
</data-member>
<data-member access='public' layout-offset-in-bits='192'>
<var-decl name='b' type-id='type-id-3' visibility='default'/>
</data-member>
<data-member access='public' layout-offset-in-bits='640'>
<var-decl name='c' type-id='type-id-9' visibility='default'/>
<var-decl name='c' type-id='type-id-8' visibility='default'/>
</data-member>
<data-member access='public' layout-offset-in-bits='1600'>
<var-decl name='d' type-id='type-id-10' visibility='default'/>
<var-decl name='d' type-id='type-id-13' visibility='default'/>
</data-member>
<data-member access='public' layout-offset-in-bits='2240'>
<var-decl name='f' type-id='type-id-5' visibility='default'/>
</data-member>
</class-decl>
<type-decl name='double' size-in-bits='64' alignment-in-bits='64' id='type-id-11'/>
<array-type-def dimensions='2' type-id='type-id-11' size-in-bits='960' alignment-in-bits='64' id='type-id-9'>
<subrange length='5' lower-bound='0' upper-bound='4' id='type-id-12'/>
<subrange length='3' lower-bound='0' upper-bound='2' id='type-id-13'/>
</array-type-def>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-14'/>
<array-type-def dimensions='1' type-id='type-id-15' size-in-bits='256' alignment-in-bits='64' id='type-id-16'>
<subrange length='4' lower-bound='0' upper-bound='3' id='type-id-17'/>
</array-type-def>
<array-type-def dimensions='1' type-id='type-id-18' size-in-bits='640' alignment-in-bits='64' id='type-id-10'>
<subrange length='10' lower-bound='0' upper-bound='9' id='type-id-19'/>
</array-type-def>
<array-type-def dimensions='1' type-id='type-id-14' size-in-bits='160' alignment-in-bits='32' id='type-id-8'>
<subrange length='5' lower-bound='0' upper-bound='4' id='type-id-12'/>
</array-type-def>
<reference-type-def kind='lvalue' type-id='type-id-7' size-in-bits='64' alignment-in-bits='64' id='type-id-20'/>
<reference-type-def kind='lvalue' type-id='type-id-19' size-in-bits='64' alignment-in-bits='64' id='type-id-20'/>
<qualified-type-def type-id='type-id-20' const='yes' id='type-id-21'/>
<pointer-type-def type-id='type-id-1' size-in-bits='64' alignment-in-bits='64' id='type-id-2'/>
<pointer-type-def type-id='type-id-14' size-in-bits='64' alignment-in-bits='64' id='type-id-15'/>
<pointer-type-def type-id='type-id-16' size-in-bits='64' alignment-in-bits='64' id='type-id-18'/>
<pointer-type-def type-id='type-id-11' size-in-bits='64' alignment-in-bits='64' id='type-id-15'/>
<pointer-type-def type-id='type-id-16' size-in-bits='64' alignment-in-bits='64' id='type-id-12'/>
<function-decl name='foo' size-in-bits='64'>
<parameter type-id='type-id-21'/>
<return type-id='type-id-14'/>
<return type-id='type-id-11'/>
</function-decl>
</abi-instr>

View File

@ -6,24 +6,24 @@
</elf-function-symbols>
<abi-instr address-size='64' path='test-v0.c'>
<type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-1'/>
<class-decl name='public_type' size-in-bits='64' is-struct='yes' visibility='default' filepath='/home/dodji/tests/test-interfaces-v0.h' line='2' column='1' id='type-id-2'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='priv_' type-id='type-id-3' visibility='default' filepath='/home/dodji/tests/test-interfaces-v0.h' line='4' column='1'/>
</data-member>
</class-decl>
<class-decl name='private_data' size-in-bits='32' is-struct='yes' visibility='default' filepath='/home/dodji/tests/test-v0.c' line='3' column='1' id='type-id-4'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='private_data0' type-id='type-id-1' visibility='default' filepath='/home/dodji/tests/test-v0.c' line='5' column='1'/>
</data-member>
</class-decl>
<class-decl name='another_public_type' size-in-bits='32' is-struct='yes' visibility='default' filepath='/home/dodji/tests/test-interfaces-v0.h' line='7' column='1' id='type-id-5'>
<class-decl name='another_public_type' size-in-bits='32' is-struct='yes' visibility='default' filepath='/home/dodji/tests/test-interfaces-v0.h' line='7' column='1' id='type-id-2'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='i' type-id='type-id-1' visibility='default' filepath='/home/dodji/tests/test-interfaces-v0.h' line='9' column='1'/>
</data-member>
</class-decl>
<pointer-type-def type-id='type-id-5' size-in-bits='64' alignment-in-bits='64' id='type-id-6'/>
<pointer-type-def type-id='type-id-4' size-in-bits='64' alignment-in-bits='64' id='type-id-3'/>
<pointer-type-def type-id='type-id-2' size-in-bits='64' alignment-in-bits='64' id='type-id-7'/>
<class-decl name='private_data' size-in-bits='32' is-struct='yes' visibility='default' filepath='/home/dodji/tests/test-v0.c' line='3' column='1' id='type-id-3'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='private_data0' type-id='type-id-1' visibility='default' filepath='/home/dodji/tests/test-v0.c' line='5' column='1'/>
</data-member>
</class-decl>
<class-decl name='public_type' size-in-bits='64' is-struct='yes' visibility='default' filepath='/home/dodji/tests/test-interfaces-v0.h' line='2' column='1' id='type-id-4'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='priv_' type-id='type-id-5' visibility='default' filepath='/home/dodji/tests/test-interfaces-v0.h' line='4' column='1'/>
</data-member>
</class-decl>
<pointer-type-def type-id='type-id-2' size-in-bits='64' alignment-in-bits='64' id='type-id-6'/>
<pointer-type-def type-id='type-id-3' size-in-bits='64' alignment-in-bits='64' id='type-id-5'/>
<pointer-type-def type-id='type-id-4' size-in-bits='64' alignment-in-bits='64' id='type-id-7'/>
<function-decl name='foo' mangled-name='foo' filepath='/home/dodji/tests/test-v0.c' line='9' column='1' visibility='default' binding='global' size-in-bits='64' alignment-in-bits='64' elf-symbol-id='foo'>
<parameter type-id='type-id-7' name='p' filepath='/home/dodji/tests/test-v0.c' line='9' column='1'/>
<parameter type-id='type-id-6' name='t' filepath='/home/dodji/tests/test-v0.c' line='10' column='1'/>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff