@@ -845,15 +845,15 @@ recording::context::new_array_type (recording::location *loc,
845
845
recording::type *element_type,
846
846
int num_elements)
847
847
{
848
- if (struct_ *s = element_type->dyn_cast_struct ())
848
+ /* if (struct_ *s = element_type->dyn_cast_struct ())
849
849
if (!s->get_fields ())
850
850
{
851
851
add_error (NULL,
852
852
"cannot create an array of type %s"
853
853
" until the fields have been set",
854
854
s->get_name ()->c_str ());
855
855
return NULL;
856
- }
856
+ }*/
857
857
recording::type *result =
858
858
new recording::array_type (this , loc, element_type, num_elements);
859
859
record (result);
@@ -2385,6 +2385,12 @@ recording::type::get_aligned (size_t alignment_in_bytes)
2385
2385
return result;
2386
2386
}
2387
2387
2388
+ void
2389
+ recording::type::set_packed ()
2390
+ {
2391
+ m_packed = true ;
2392
+ }
2393
+
2388
2394
/* Given a type, get a vector version of the type.
2389
2395
2390
2396
Implements the post-error-checking part of
@@ -3578,7 +3584,8 @@ recording::struct_::replay_into (replayer *r)
3578
3584
set_playback_obj (
3579
3585
r->new_compound_type (playback_location (r, get_loc ()),
3580
3586
get_name ()->c_str (),
3581
- true /* is_struct */ ));
3587
+ true , /* is_struct */
3588
+ m_packed));
3582
3589
}
3583
3590
3584
3591
const char *
@@ -3632,7 +3639,8 @@ recording::union_::replay_into (replayer *r)
3632
3639
set_playback_obj (
3633
3640
r->new_compound_type (playback_location (r, get_loc ()),
3634
3641
get_name ()->c_str (),
3635
- false /* is_struct */ ));
3642
+ false , /* is_struct */
3643
+ m_packed));
3636
3644
}
3637
3645
3638
3646
/* Implementation of recording::memento::make_debug_string for
@@ -3703,7 +3711,7 @@ recording::fields::replay_into (replayer *)
3703
3711
playback_fields.create (m_fields.length ());
3704
3712
for (unsigned i = 0 ; i < m_fields.length (); i++)
3705
3713
playback_fields.safe_push (m_fields[i]->playback_field ());
3706
- m_struct_or_union->playback_compound_type ()->set_fields (&playback_fields);
3714
+ m_struct_or_union->playback_compound_type ()->set_fields (&playback_fields, m_struct_or_union-> m_packed );
3707
3715
}
3708
3716
3709
3717
/* Override the default implementation of
0 commit comments