Always emit vtable offset for virtual member function

* src/abg-writer.cc (write_voffset): Emit the vtable offset of
	virtual function even when the offset is zero.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2014-10-02 10:12:40 +02:00
parent 6f50d38c23
commit 0c4843bc5c

View File

@ -585,8 +585,11 @@ write_voffset(function_decl_sptr fn, ostream&o)
if (!fn)
return;
if (size_t voffset = get_member_function_vtable_offset(fn))
o << " vtable-offset='" << voffset << "'";
if (get_member_function_is_virtual(fn))
{
size_t voffset = get_member_function_vtable_offset(fn);
o << " vtable-offset='" << voffset << "'";
}
}
/// Serialize an elf_symbol::type into an XML node attribute named