Set class {size,loc} when adding members to a decl-only class

* src/abg-dwarf-reader.cc (build_class_type_and_add_to_ir): Do not
	forget to set class size and location when adding members to a
	declaration-only class, turning it into a definition class.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2014-03-13 11:41:38 +01:00
parent ca53b99c5a
commit a27f5f2e92

View File

@ -2231,7 +2231,11 @@ build_class_type_and_add_to_ir(read_context& ctxt,
decl_base_sptr res;
if (klass)
res = result = klass;
{
res = result = klass;
result->set_size_in_bits(size);
result->set_location(loc);
}
else
{
result.reset(new class_decl(name, size, 0, is_struct, loc,