Skip to content

Commit 4d2b4f4

Browse files
committed
AST: Remove ArchetypeType::getParent()
1 parent a275780 commit 4d2b4f4

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

include/swift/AST/Types.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6574,10 +6574,6 @@ class ArchetypeType : public SubstitutableType,
65746574
/// which the archetype conforms.
65756575
Type getNestedTypeByName(Identifier name);
65766576

6577-
/// Retrieve the parent of this archetype, or null if this is a
6578-
/// primary archetype.
6579-
ArchetypeType *getParent() const;
6580-
65816577
/// Return the archetype that represents the root generic parameter of its
65826578
/// interface type.
65836579
ArchetypeType *getRoot() const;

lib/AST/Type.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3381,15 +3381,6 @@ ArchetypeType::ArchetypeType(TypeKind Kind,
33813381
getSubclassTrailingObjects<ProtocolDecl *>());
33823382
}
33833383

3384-
ArchetypeType *ArchetypeType::getParent() const {
3385-
if (auto depMemTy = getInterfaceType()->getAs<DependentMemberType>()) {
3386-
return getGenericEnvironment()->mapTypeIntoContext(depMemTy->getBase())
3387-
->castTo<ArchetypeType>();
3388-
}
3389-
3390-
return nullptr;
3391-
}
3392-
33933384
ArchetypeType *ArchetypeType::getRoot() const {
33943385
if (isRoot()) {
33953386
return const_cast<ArchetypeType *>(this);

0 commit comments

Comments
 (0)