Skip to content

Commit 414a7bf

Browse files
committed
AST: Remove ProtocolConformanceRef::getInherited() now that all usages are gone
1 parent de0a7a0 commit 414a7bf

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

include/swift/AST/ProtocolConformanceRef.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,6 @@ class ProtocolConformanceRef {
8686
/// Return the protocol requirement.
8787
ProtocolDecl *getRequirement() const;
8888

89-
/// Get the inherited conformance corresponding to the given protocol.
90-
/// Returns `this` if `parent` is already the same as the protocol this
91-
/// conformance represents.
92-
ProtocolConformanceRef getInherited(ProtocolDecl *parent) const;
93-
9489
/// Apply a substitution to the conforming type.
9590
ProtocolConformanceRef subst(Type origType,
9691
TypeSubstitutionFn subs,

lib/AST/ProtocolConformance.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -77,30 +77,6 @@ ProtocolDecl *ProtocolConformanceRef::getRequirement() const {
7777
}
7878
}
7979

80-
ProtocolConformanceRef
81-
ProtocolConformanceRef::getInherited(ProtocolDecl *parent) const {
82-
assert((getRequirement() == parent ||
83-
getRequirement()->inheritsFrom(parent)) &&
84-
"not a parent of this protocol");
85-
86-
if (parent == getRequirement())
87-
return *this;
88-
89-
// For an abstract requirement, simply produce a new abstract requirement
90-
// for the parent.
91-
if (isAbstract()) {
92-
return ProtocolConformanceRef(parent);
93-
}
94-
95-
// Navigate concrete conformances.
96-
if (isConcrete()) {
97-
return ProtocolConformanceRef(
98-
getConcrete()->getInheritedConformance(parent));
99-
}
100-
101-
llvm_unreachable("unhandled ProtocolConformanceRef");
102-
}
103-
10480
ProtocolConformanceRef
10581
ProtocolConformanceRef::subst(Type origType,
10682
TypeSubstitutionFn subs,

0 commit comments

Comments
 (0)