Without this, GCH serialization of late template expansions will
encounter an assertion failure.
Changes were required to ASTReader::ReadString to add support for
reading a string from a RecordDataImpl (which is the type consumed by
ReadToken) rather than a RecordData.
#pragma pack slot names are read into preprocessor storage.
This requires incidental changes [Parse,Sema] to move PragmaPackInfo to Sema
There is precedent for ASTReader/ASTWriter to poke into Sema.
Your test should include testing of the slot string too, so we are sure all fields are serialized and restored correctly. Otherwise this looks reasonable to me.