@@ -845,15 +845,15 @@ recording::context::new_array_type (recording::location *loc,
845845 recording::type *element_type,
846846 int num_elements)
847847{
848- if (struct_ *s = element_type->dyn_cast_struct ())
848+ /* if (struct_ *s = element_type->dyn_cast_struct ())
849849 if (!s->get_fields ())
850850 {
851851 add_error (NULL,
852852 "cannot create an array of type %s"
853853 " until the fields have been set",
854854 s->get_name ()->c_str ());
855855 return NULL;
856- }
856+ }*/
857857 recording::type *result =
858858 new recording::array_type (this , loc, element_type, num_elements);
859859 record (result);
@@ -2385,6 +2385,12 @@ recording::type::get_aligned (size_t alignment_in_bytes)
23852385 return result;
23862386}
23872387
2388+ void
2389+ recording::type::set_packed ()
2390+ {
2391+ m_packed = true ;
2392+ }
2393+
23882394/* Given a type, get a vector version of the type.
23892395
23902396 Implements the post-error-checking part of
@@ -3578,7 +3584,8 @@ recording::struct_::replay_into (replayer *r)
35783584 set_playback_obj (
35793585 r->new_compound_type (playback_location (r, get_loc ()),
35803586 get_name ()->c_str (),
3581- true /* is_struct */ ));
3587+ true , /* is_struct */
3588+ m_packed));
35823589}
35833590
35843591const char *
@@ -3632,7 +3639,8 @@ recording::union_::replay_into (replayer *r)
36323639 set_playback_obj (
36333640 r->new_compound_type (playback_location (r, get_loc ()),
36343641 get_name ()->c_str (),
3635- false /* is_struct */ ));
3642+ false , /* is_struct */
3643+ m_packed));
36363644}
36373645
36383646/* Implementation of recording::memento::make_debug_string for
@@ -3703,7 +3711,7 @@ recording::fields::replay_into (replayer *)
37033711 playback_fields.create (m_fields.length ());
37043712 for (unsigned i = 0 ; i < m_fields.length (); i++)
37053713 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 );
37073715}
37083716
37093717/* Override the default implementation of
0 commit comments