Skip to content

Commit 01fe9b8

Browse files
committed
AST: Remove TypeBase::getRootOpenedExistentials()
1 parent 2c4f871 commit 01fe9b8

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

include/swift/AST/Types.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,6 @@ class alignas(1 << TypeAlignInBits) TypeBase
770770
/// Determine whether the type is an opened existential type with Error inside
771771
bool isOpenedExistentialWithError();
772772

773-
/// Retrieve the set of root opened archetypes that occur within this type.
774-
void getRootOpenedExistentials(
775-
SmallVectorImpl<OpenedArchetypeType *> &rootOpenedArchetypes) const;
776-
777773
/// Retrieve the set of type parameter packs that occur within this type.
778774
void getTypeParameterPacks(SmallVectorImpl<Type> &rootParameterPacks);
779775

lib/AST/Type.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -536,25 +536,6 @@ bool TypeBase::hasOpenedExistentialWithRoot(
536536
});
537537
}
538538

539-
void TypeBase::getRootOpenedExistentials(
540-
SmallVectorImpl<OpenedArchetypeType *> &rootOpenedArchetypes) const {
541-
if (!hasOpenedExistential())
542-
return;
543-
544-
SmallPtrSet<OpenedArchetypeType *, 4> known;
545-
getCanonicalType().findIf([&](Type type) -> bool {
546-
auto *archetype = dyn_cast<OpenedArchetypeType>(type.getPointer());
547-
if (!archetype)
548-
return false;
549-
550-
auto *root = archetype->getRoot();
551-
if (known.insert(root).second)
552-
rootOpenedArchetypes.push_back(root);
553-
554-
return false;
555-
});
556-
}
557-
558539
Type TypeBase::addCurriedSelfType(const DeclContext *dc) {
559540
if (!dc->isTypeContext())
560541
return this;

0 commit comments

Comments
 (0)