Skip to content

Commit 8e256d9

Browse files
committed
AST: Remove TypeBase::getRootOpenedExistentials()
1 parent b23a340 commit 8e256d9

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
@@ -783,10 +783,6 @@ class alignas(1 << TypeAlignInBits) TypeBase
783783
/// Determine whether the type is an opened existential type with Error inside
784784
bool isOpenedExistentialWithError();
785785

786-
/// Retrieve the set of root opened archetypes that occur within this type.
787-
void getRootOpenedExistentials(
788-
SmallVectorImpl<OpenedArchetypeType *> &rootOpenedArchetypes) const;
789-
790786
/// Retrieve the set of type parameter packs that occur within this type.
791787
void getTypeParameterPacks(SmallVectorImpl<Type> &rootParameterPacks);
792788

lib/AST/Type.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -531,25 +531,6 @@ bool TypeBase::hasLocalArchetypeFromEnvironment(
531531
});
532532
}
533533

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

0 commit comments

Comments
 (0)