mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Serialization: Simplify PackType serialization
This commit is contained in:
@@ -5004,14 +5004,14 @@ public:
|
||||
void visitPackType(const PackType *packTy) {
|
||||
using namespace decls_block;
|
||||
unsigned abbrCode = S.DeclTypeAbbrCodes[PackTypeLayout::Code];
|
||||
PackTypeLayout::emitRecord(S.Out, S.ScratchRecord, abbrCode);
|
||||
|
||||
abbrCode = S.DeclTypeAbbrCodes[PackTypeEltLayout::Code];
|
||||
for (auto elt : packTy->getElementTypes()) {
|
||||
PackTypeEltLayout::emitRecord(
|
||||
S.Out, S.ScratchRecord, abbrCode,
|
||||
S.addTypeRef(elt));
|
||||
SmallVector<TypeID, 8> variableData;
|
||||
for (auto elementType : packTy->getElementTypes()) {
|
||||
variableData.push_back(S.addTypeRef(elementType));
|
||||
}
|
||||
|
||||
PackTypeLayout::emitRecord(S.Out, S.ScratchRecord, abbrCode,
|
||||
variableData);
|
||||
}
|
||||
|
||||
void visitSILPackType(const SILPackType *packTy) {
|
||||
@@ -5568,7 +5568,6 @@ void Serializer::writeAllDeclsAndTypes() {
|
||||
registerDeclTypeAbbr<DynamicSelfTypeLayout>();
|
||||
registerDeclTypeAbbr<PackExpansionTypeLayout>();
|
||||
registerDeclTypeAbbr<PackTypeLayout>();
|
||||
registerDeclTypeAbbr<PackTypeEltLayout>();
|
||||
|
||||
registerDeclTypeAbbr<ErrorFlagLayout>();
|
||||
registerDeclTypeAbbr<ErrorTypeLayout>();
|
||||
|
||||
Reference in New Issue
Block a user