mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[serialization] Add support for ArrayTypes.
...in a quest for completeness. ArrayTypes don't actually work yet (single-dimensional arrays are typed as slices), but when they do the test that is currently XFAIL'd should start passing. With this, all non-transient types can now be serialized and deserialized. Swift SVN r6101
This commit is contained in:
@@ -1356,6 +1356,15 @@ Type ModuleFile::getType(TypeID TID) {
|
||||
break;
|
||||
}
|
||||
|
||||
case decls_block::ARRAY_TYPE: {
|
||||
TypeID baseID;
|
||||
uint64_t size;
|
||||
decls_block::ArrayTypeLayout::readRecord(scratch, baseID, size);
|
||||
|
||||
typeOrOffset = ArrayType::get(getType(baseID), size, ctx);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
// We don't know how to deserialize this kind of type.
|
||||
error();
|
||||
|
||||
Reference in New Issue
Block a user