mirror of
git://sourceware.org/git/libabigail.git
synced 2025-03-01 04:10:47 +00:00
When reading C++ class informatin DWARF, it can happen that a given virtual member function does not yet have a vtable offset. Right now, that offset is set to zero. Just like a virtual member function which actual vtable offset is zero. So we don't make a difference between a virtual function with no vtable offset and a virtual function with a vtable offset set to zero. This can lead to confusions during class comparison. This patch fixes that problem by setting the default vtable offset to -1. So whenever a vtable offset is -1 it means that the virtual member function doesn't yet have a vtable offset. * include/abg-fwd.h (member_function_has_vtable_offset): Declare new function. (get_member_function_vtable_offset): Return a ssize_t, not a size_t. (set_member_function_vtable_offset): Take a ssize_t, not a size_t. * include/abg-ir.h (class_decl::virtual_mem_fn_map_type): Adjust the map typedef to make it take ssize_t as the type of the key. (mem_fn_context_rel::vtable_offset_in_bits_): Make this data member be of ssize_t type, not size_t. (mem_fn_context_rel::mem_fn_context_rel): Initialize the vtable_offset_in_bits_ data member to -1. * src/abg-ir.cc (member_function_has_vtable_offset): Define new function. (get_member_function_vtable_offset): Return a ssize_t, not a size_t. (set_member_function_vtable_offset): Take a ssize_t, not a size_t. * src/abg-dwarf-reader.cc (die_virtual_function_index): Take an int64_t& rather than a uint64_t&. (finish_member_function_reading): Don't set the vtable offset if it's -1. * src/abg-reader.cc (build_class_decl): Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
abg-comp-filter.h | ||
abg-comparison.h | ||
abg-config.h | ||
abg-corpus.h | ||
abg-diff-utils.h | ||
abg-dwarf-reader.h | ||
abg-fwd.h | ||
abg-hash.h | ||
abg-ini.h | ||
abg-interned-str.h | ||
abg-ir.h | ||
abg-libxml-utils.h | ||
abg-libzip-utils.h | ||
abg-reader.h | ||
abg-sptr-utils.h | ||
abg-suppression.h | ||
abg-tools-utils.h | ||
abg-traverse.h | ||
abg-version.h.in | ||
abg-viz-common.h | ||
abg-viz-dot.h | ||
abg-viz-svg.h | ||
abg-workers.h | ||
abg-writer.h | ||
Makefile.am |