mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
TypeDecoder: Don't demangle freestanding PackExpansionTypes
This commit is contained in:
@@ -124,8 +124,6 @@ public:
|
||||
|
||||
Type createSILPackType(ArrayRef<Type> eltTypes, bool isElementAddress);
|
||||
|
||||
Type createPackExpansionType(Type patternType, Type countType);
|
||||
|
||||
size_t beginPackExpansion(Type countType);
|
||||
|
||||
void advancePackExpansion(size_t index);
|
||||
|
||||
@@ -1106,16 +1106,8 @@ protected:
|
||||
}
|
||||
|
||||
case NodeKind::PackExpansion: {
|
||||
if (Node->getNumChildren() < 2)
|
||||
return MAKE_NODE_TYPE_ERROR(Node,
|
||||
"fewer children (%zu) than required (2)",
|
||||
Node->getNumChildren());
|
||||
|
||||
auto patternType = decodeMangledType(Node->getChild(0), depth + 1);
|
||||
auto countType = decodeMangledType(Node->getChild(1), depth + 1);
|
||||
|
||||
return Builder.createPackExpansionType(patternType.getType(),
|
||||
countType.getType());
|
||||
return MAKE_NODE_TYPE_ERROR0(Node,
|
||||
"pack expansion type in unsupported position");
|
||||
}
|
||||
|
||||
case NodeKind::DependentGenericType: {
|
||||
|
||||
@@ -758,12 +758,6 @@ public:
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const TypeRef *createPackExpansionType(const TypeRef *patternType,
|
||||
const TypeRef *countType) {
|
||||
// FIXME: Remote mirrors support for variadic generics.
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
size_t beginPackExpansion(const TypeRef *countType) {
|
||||
// FIXME: Remote mirrors support for variadic generics.
|
||||
return 0;
|
||||
|
||||
@@ -355,10 +355,6 @@ Type ASTBuilder::createSILPackType(ArrayRef<Type> eltTypes,
|
||||
return SILPackType::get(Ctx, extInfo, elements);
|
||||
}
|
||||
|
||||
Type ASTBuilder::createPackExpansionType(Type patternType, Type countType) {
|
||||
return PackExpansionType::get(patternType, countType);
|
||||
}
|
||||
|
||||
size_t ASTBuilder::beginPackExpansion(Type countType) {
|
||||
ActivePackExpansions.push_back(countType);
|
||||
|
||||
|
||||
@@ -2021,12 +2021,6 @@ public:
|
||||
return TYPE_LOOKUP_ERROR_FMT("Lowered SILPackType cannot be demangled");
|
||||
}
|
||||
|
||||
TypeLookupErrorOr<BuiltType>
|
||||
createPackExpansionType(BuiltType patternType, BuiltType countType) const {
|
||||
// FIXME: Runtime support for variadic generics.
|
||||
return BuiltType();
|
||||
}
|
||||
|
||||
size_t beginPackExpansion(BuiltType countType) {
|
||||
if (!countType.isMetadataPack()) {
|
||||
swift::fatalError(0, "Pack expansion count type should be a pack\n");
|
||||
|
||||
Reference in New Issue
Block a user