Skip to content

Commit 0708323

Browse files
committed
AST: Remove TypeBase::getAnyExistentialTypeProtocols()
The last usages were in IRGen and they're now gone.
1 parent 7bf2f7d commit 0708323

File tree

3 files changed

+0
-26
lines changed

3 files changed

+0
-26
lines changed

include/swift/AST/Type.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,6 @@ class CanType : public Type {
353353
static bool isAnyExistentialTypeImpl(CanType type);
354354
static void getExistentialTypeProtocolsImpl(CanType type,
355355
SmallVectorImpl<ProtocolDecl*> &protocols);
356-
static void getAnyExistentialTypeProtocolsImpl(CanType type,
357-
SmallVectorImpl<ProtocolDecl*> &protocols);
358356
static bool isObjCExistentialTypeImpl(CanType type);
359357
static CanType getAnyOptionalObjectTypeImpl(CanType type,
360358
OptionalTypeKind &kind);
@@ -413,11 +411,6 @@ class CanType : public Type {
413411
void getExistentialTypeProtocols(
414412
SmallVectorImpl<ProtocolDecl *> &protocols);
415413

416-
/// Given that this type is any kind of existential, return its
417-
/// protocols in a canonical order.
418-
void getAnyExistentialTypeProtocols(
419-
SmallVectorImpl<ProtocolDecl *> &protocols);
420-
421414
/// Break an existential down into a set of constraints.
422415
ExistentialLayout getExistentialLayout();
423416

include/swift/AST/Types.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,10 +590,6 @@ class alignas(1 << TypeAlignInBits) TypeBase {
590590
/// its list of protocols.
591591
void getExistentialTypeProtocols(SmallVectorImpl<ProtocolDecl *> &protocols);
592592

593-
/// Given that this type is any kind of existential type, produce
594-
/// its list of protocols.
595-
void getAnyExistentialTypeProtocols(SmallVectorImpl<ProtocolDecl *> &protocols);
596-
597593
/// Break an existential down into a set of constraints.
598594
ExistentialLayout getExistentialLayout();
599595

lib/AST/Type.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,6 @@ void TypeBase::getExistentialTypeProtocols(
213213
getCanonicalType().getExistentialTypeProtocols(protocols);
214214
}
215215

216-
void TypeBase::getAnyExistentialTypeProtocols(
217-
SmallVectorImpl<ProtocolDecl*> &protocols) {
218-
getCanonicalType().getAnyExistentialTypeProtocols(protocols);
219-
}
220-
221216
void CanType::getExistentialTypeProtocols(
222217
SmallVectorImpl<ProtocolDecl*> &protocols) {
223218
// FIXME: Remove this completely
@@ -229,16 +224,6 @@ void CanType::getExistentialTypeProtocols(
229224
protocols.push_back(proto->getDecl());
230225
}
231226

232-
void CanType::getAnyExistentialTypeProtocols(
233-
SmallVectorImpl<ProtocolDecl*> &protocols) {
234-
if (auto metatype = dyn_cast<ExistentialMetatypeType>(*this)) {
235-
metatype.getInstanceType().getAnyExistentialTypeProtocols(protocols);
236-
return;
237-
}
238-
239-
getExistentialTypeProtocols(protocols);
240-
}
241-
242227
ExistentialLayout::ExistentialLayout(ProtocolType *type) {
243228
assert(type->isCanonical());
244229

0 commit comments

Comments
 (0)