[PATCH] D26253: [CodeView] Hook CodeViewRecordIO up to the type serialization path.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 2 11:41:55 PDT 2016
zturner created this revision.
zturner added reviewers: amccarth, inglorion, rnk, ruiu.
zturner added a subscriber: llvm-commits.
Herald added subscribers: modocache, mgorny.
This patch does a lot. The following classes are all **deleted**
In their place, they are replaced with two new classes:
#2 has the same name as a previous class, but it is completely re-written.
#1 is a replacement for the previous `TypeSerializationVisitor`.
The two new classes make use of the previously introduced `CodeViewRecordIO` to accomplish everything that used to be accomplished by the 6 deleted classes. The advantages of this new approach have been discussed previously, but I will repeat them here for posterity and for anyone reading this unfamiliar with previous discussions.
1. A single codepath for both reading and writing. Now `TypeDeserializer` and `TypeSerializer` both use the same mappings to define their record layout.
2. Better handling of field list record splitting and size fields. Previously the injection of the Record length was separated from the splitting logic, even though each one needs to know certain details about the other. This led to some hackish code where certain classes would make assumptions about what happened in the others. In some cases there were latent bugs (such as it being possible to write a record that was 2 bytes too large due to not taking into consideration the record length when splitting).
3. Being able to use the same machinery for symbol record. This patch will bring full support for serializing and deserializing type records. We have additional code still in LLVM that **deserializes** symbol records. To support serialization, we would need to go re-implement a parallel codepath. With this, we will be able to achieve serialization and deserialization without adding this parallel codepath.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 110248 bytes
Desc: not available
More information about the llvm-commits