mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[serialization] Handle oneof and class types (but not decls).
This allows us to reference Bool. Swift SVN r6030
This commit is contained in:
@@ -1019,12 +1019,12 @@ Type ModuleFile::getType(TypeID TID) {
|
||||
break;
|
||||
}
|
||||
|
||||
case decls_block::STRUCT_TYPE: {
|
||||
DeclID structID;
|
||||
case decls_block::NOMINAL_TYPE: {
|
||||
DeclID declID;
|
||||
TypeID parentID;
|
||||
decls_block::StructTypeLayout::readRecord(scratch, structID, parentID);
|
||||
typeOrOffset = StructType::get(cast<StructDecl>(getDecl(structID)),
|
||||
getType(parentID), ctx);
|
||||
decls_block::NominalTypeLayout::readRecord(scratch, declID, parentID);
|
||||
typeOrOffset = NominalType::get(cast<NominalTypeDecl>(getDecl(declID)),
|
||||
getType(parentID), ctx);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1121,14 +1121,6 @@ Type ModuleFile::getType(TypeID TID) {
|
||||
break;
|
||||
}
|
||||
|
||||
case decls_block::PROTOCOL_TYPE: {
|
||||
DeclID declID;
|
||||
decls_block::ProtocolTypeLayout::readRecord(scratch, declID);
|
||||
auto proto = cast<ProtocolDecl>(getDecl(declID));
|
||||
typeOrOffset = proto->getDeclaredType();
|
||||
break;
|
||||
}
|
||||
|
||||
case decls_block::ARCHETYPE_TYPE: {
|
||||
IdentifierID nameID;
|
||||
bool isPrimary;
|
||||
|
||||
Reference in New Issue
Block a user