TypeDecoder: Don't demangle freestanding PackExpansionTypes

This commit is contained in:
Slava Pestov
2023-07-05 16:06:56 -04:00
parent fb14aef32a
commit b471cd308f
5 changed files with 2 additions and 28 deletions

View File

@@ -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);

View File

@@ -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: {

View File

@@ -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;