Modifed the test serialization driver to...

(1) serialize out top-level decls BEFORE serializing out translation unit
structures like ASTContext.

(2) deserialize out translation unit structures like ASTContext before
top-level decls by first skipping the decls in the bitstream, deserializing
ASTContext and friends, and then jumping back to the bitstream block with the
decls and then deserializing them.

Change (1) allows us to utilize the pointer-tracking system in the Serializer
to only serialize out metadata that is actually referenced by the ASTS.

Change (2) allows us to deserialize the metadata first as before, which
signficantly reduces the amount of pointer backpatching the deserializer
would have to do if the decls were deserialized first.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43974 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed