mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-22 17:52:16 +00:00
c243aac0a4
* src/abg-ir.h (function_decl::parameter::parameter): New constructor with variadic parameter marker. (function_decl::m_type): Make this protected to let method_decl inheriting class to access it. (function_decl::get_type): Move this out-of-line. (class method_type, method_type_hash): New types. (enum class_decl::access_specifier): Add no_access new enumerator. (class_decl::data_member::data_member): Move this out-of-line. (class_decl::data_member::~data_member): Declare virtual destructor. (class method_decl): New class. (class member_function): Make this inherit method_decl, instead of function_decl. (class_decl::class_decl): New constructors. (class_decl::{hashing_started, is_declaration_only, set_earlier_declaration, get_earlier_declaration}): New methods. * src/abg-ir.cc (add_decl_to_scope): If a decl is already in a scope, don't add it to this scope. (get_global_scope): Make this work when passed an instance of global_scope. (dynamic_type_hash::operator()): Add support for method_type. (method_type::{method_type, set_class_type, ~method_type, }) (method_type_hash::operator()): New defintions. (function_decl::get_type, class_decl::class_decl): Move these out-of-line here. (class_decl::method_decl::{method_decl, ~method_decl, get_type}): New definitions. (class_decl::member_function::member_function): Move this out-of-line here. Support method_decl. (class_decl::data_member::data_member): Likewise. (class_decl_hash::operator()): Guard this against endless loop. * src/abg-reader.cc (write_class_is_declaration_only): New static function. (write_var_decl): Take a flag to write the mangled name or not. (write_function_decl): Take a flag to skip the first parameter. (write_cdtor_const_static): Use 'yes' instead of 'true' as value of the properties. (write_decl, write_function_template_decl): Adjust wrt the new signatures of write_var_decl and write_function_decl. (write_enum_type_decl): Simplify call to write_location. (write_class_decl): Support serializing declaration-only classes. * src/abg-writer.cc: * tests/data/test-read-write/test17.xml: New test input. * tests/test-read-write.cc: De-serialize the above, and serialize it back. * tests/data/test-read-write/test10.xml: Update this test.
29 lines
1.3 KiB
XML
29 lines
1.3 KiB
XML
<abi-instr version='1.0'>
|
|
<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'/>
|
|
<pointer-type-def type-id='type-id-2' size-in-bits='64' alignment-in-bits='64' id='type-id-3'/>
|
|
<namespace-decl name='ns0'>
|
|
<class-decl name='base0' size-in-bits='40' alignment-in-bits='8' visibility='default' id='type-id-4'>
|
|
<member-type access='public'>
|
|
<typedef-decl name='TINT' type-id='type-id-2' id='type-id-5'/>
|
|
</member-type>
|
|
<data-member access='private'>
|
|
<var-decl name='m_first' type-id='type-id-1'/>
|
|
</data-member>
|
|
<data-member access='public' static='yes'>
|
|
<var-decl name='m_second' type-id='type-id-2'/>
|
|
</data-member>
|
|
</class-decl>
|
|
</namespace-decl>
|
|
<namespace-decl name='ns1'>
|
|
<class-decl name='C' size-in-bits='40' alignment-in-bits='8' visibility='default' id='type-id-6'>
|
|
<base-class access='public' type-id='type-id-4'/>
|
|
<member-function access='public'>
|
|
<function-decl name='get_first' mangled-name='blibli' binding='global' size-in-bits='8' alignment-in-bits='8'>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
</member-function>
|
|
</class-decl>
|
|
</namespace-decl>
|
|
</abi-instr>
|