mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Serialization: Remove mechanism for serializing references to in-memory Decl's AllArchetypes
I don't see any tests failing with this code removed; I guess either the duplicate archetype issue no longer occurs, or does not matter since we use interface types almost everywhere when talking about Decls from other modules.
This commit is contained in:
@@ -3816,19 +3816,9 @@ Type ModuleFile::getType(TypeID TID) {
|
||||
auto nominal = cast<NominalTypeDecl>(getDecl(declID));
|
||||
auto parentTy = getType(parentID);
|
||||
|
||||
// Check the first ID to decide if we are using indices to the Decl's
|
||||
// Archetypes.
|
||||
SmallVector<Type, 8> genericArgs;
|
||||
if (rawArgumentIDs.size() > 1 && rawArgumentIDs[0] == INT32_MAX) {
|
||||
for (unsigned i = 1; i < rawArgumentIDs.size(); i++) {
|
||||
auto index = rawArgumentIDs[i];
|
||||
genericArgs.push_back(nominal->getGenericParams()
|
||||
->getAllArchetypes()[index]);
|
||||
}
|
||||
} else {
|
||||
for (TypeID type : rawArgumentIDs)
|
||||
genericArgs.push_back(getType(type));
|
||||
}
|
||||
for (TypeID type : rawArgumentIDs)
|
||||
genericArgs.push_back(getType(type));
|
||||
|
||||
auto boundTy = BoundGenericType::get(nominal, parentTy, genericArgs);
|
||||
typeOrOffset = boundTy;
|
||||
|
||||
Reference in New Issue
Block a user