mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-09 02:39:37 +00:00
9cb146a013
* include/abg-comparison.h (compute_diff_for_distinct_kinds): Take the first two arguments of type const type_or_decl_base_sptr instead. * include/abg-ir.h (translation_unit::get_function_types): Declare new method. (function_types): Declare new typedef. * src/abg-comparison.cc (compute_diff_for_types): Take the first two arguments of type const type_or_decl_base_sptr instead of a const decl_base_sptr. (try_to_diff): Likewise. (try_to_diff<class_decl>): Likewise. (try_to_diff_distinct_kinds): Likewise. (compute_diff_for_distinct_kinds): Likewise. Also remove a variant accepting arguments of type const type_base_sptr. * src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Skip building a pointer if it points to the beginning of a vptr. (build_pointer_type_def): Declare utype_decl of type type_or_decl_base_sptr and adjust assignments to it accordingly. (build_function_type): New function definition. (build_function_decl): Call build_function_type instead of building an ftype manually. (build_ir_node_from_die): Amend case DW_TAG_subroutine_type with appropriate calls to build a function type. * src/abg-ir.cc (translation_unit::get_function_types): New method definition. ({pointer,reference}_type_def::pointer_type_def): Expect that pointed_to might not have an accompanying declaration and set a type's name in this case as well. ({pointer,reference}_type_def::get_qualified_name): Generate a qualified name even if the pointed-to type has no declaration. * src/abg-reader.cc (build_function_type): New function definition. (handle_element_node): Return a type_or_decl_base_sptr instead and try calling handle_function_type in addition to others. (handle_function_type): New function definition that calls build_function_type. (build_type): Try calling build_function_type as well. * src/abg-writer.cc (fn_shared_ptr_map): Declare new typedef. (write_context::{clear_referenced_fntypes_map,fntype_is_referenced, record_fntype_as_referenced}): New member functions. (write_translation_unit): Call the new clear_referenced_fntypes_map. * tests/data/Makefile.am: Add the new test material to the build system. (write_translation_unit): Separately write function types that have been recorded to emit by write_{pointer,reference}_type_def. (write_{pointer,reference}_type_def): Record the type pointed to as a type to be emitted if type == function type. (write_function_type): Write the details of a function type in the abixml format and unmark the type. * tests/data/test-diff-dwarf/test32-fnptr-changes-report-0.txt: New test reference report. * tests/data/test-diff-dwarf/test32-fnptr-changes-v{0,1}.cc: New test source files. * tests/data/test-diff-dwarf/test32-fnptr-changes-v{0,1}.o: New binary test inputs. * tests/data/test-diff-dwarf/test33-fnref-changes-report-0.txt: New test reference report. * tests/data/test-diff-dwarf/test33-fnref-changes-v{0,1}.cc: New test source files. * tests/data/test-diff-dwarf/test33-fnref-changes-v{0,1}.o: New binary test inputs. * tests/data/test-diff-filter/test30-pr18904-rvalueref-report0.txt: Adjust. * tests/data/test-diff-filter/test31-pr18535-libstdc++-report-0.txt: Likewise. * tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise. * tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise. * tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise. * tests/data/test-read-dwarf/test13-pr18894.so.abi: Likewise. * tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise. * tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise. * tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise. * tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise. * tests/data/test-read-write/test27.xml: New test source file. * tests/test-diff-dwarf.cc: Adjust to launch the new tests. * tests/test-read-write.cc: Likewise. Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
31 lines
1.7 KiB
XML
31 lines
1.7 KiB
XML
<abi-corpus path='repr7' architecture='elf-amd-x86_64'>
|
|
<elf-function-symbols>
|
|
<elf-symbol name='_Z2fni' type='func-type' binding='global-binding' is-defined='yes'/>
|
|
</elf-function-symbols>
|
|
<elf-variable-symbols>
|
|
<elf-symbol name='fnptr0' type='object-type' binding='global-binding' is-defined='yes'/>
|
|
<elf-symbol name='fnptr1' type='object-type' binding='global-binding' is-defined='yes'/>
|
|
</elf-variable-symbols>
|
|
<abi-instr version='1.0' address-size='64' path='../../../repr7.cc' language='LANG_C_plus_plus'>
|
|
<type-decl name='void' id='type-id-1'/>
|
|
<type-decl name='int' size-in-bits='32' id='type-id-2'/>
|
|
<function-decl name='fn' mangled-name='_Z2fni' filepath='../../../repr7.cc' line='3' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='_Z2fni'>
|
|
<parameter type-id='type-id-2'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-decl>
|
|
<pointer-type-def type-id='type-id-3' size-in-bits='64' id='type-id-4'/>
|
|
<var-decl name='fnptr0' type-id='type-id-4' mangled-name='fnptr0' visibility='default' filepath='../../../repr7.cc' line='1' column='1' elf-symbol-id='fnptr0'/>
|
|
<type-decl name='double' size-in-bits='64' id='type-id-5'/>
|
|
<pointer-type-def type-id='type-id-6' size-in-bits='64' id='type-id-7'/>
|
|
<var-decl name='fnptr1' type-id='type-id-7' mangled-name='fnptr1' visibility='default' filepath='../../../repr7.cc' line='7' column='1' elf-symbol-id='fnptr1'/>
|
|
<function-type size-in-bits='64' id='type-id-3'>
|
|
<parameter type-id='type-id-2'/>
|
|
<return type-id='type-id-1'/>
|
|
</function-type>
|
|
<function-type size-in-bits='64' id='type-id-6'>
|
|
<parameter type-id='type-id-5'/>
|
|
<return type-id='type-id-5'/>
|
|
</function-type>
|
|
</abi-instr>
|
|
</abi-corpus>
|