Do not try to represent the offset for a static data member

* src/abg-comparison.cc (represent_data_member(var_decl_sptr,
	ostream&)): If the data member is static, do not try to represent
	its offset.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2014-04-16 11:06:59 +02:00
parent f2872084ec
commit 63965bbae7

View File

@ -1110,10 +1110,11 @@ represent_data_member(var_decl_sptr d, ostream& out)
|| (!get_member_is_static(d) && !get_data_member_is_laid_out(d)))
return;
out << "'" << d->get_pretty_representation() << "'"
<< ", at offset "
<< get_data_member_offset(d)
<< " (in bits)\n";
out << "'" << d->get_pretty_representation() << "'";
if (!get_member_is_static(d))
out << ", at offset "
<< get_data_member_offset(d)
<< " (in bits)\n";
}
/// Represent the changes that happened on two versions of a given