Skip to content

Commit eb2010e

Browse files
committed
AST: Remove AnyFunctionRef::hasType() and isKnownNoEscape()
1 parent c11beb5 commit eb2010e

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

include/swift/AST/AnyFunctionRef.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,6 @@ class AnyFunctionRef {
7575
return TheFunction.get<AbstractClosureExpr *>()->getCaptureInfo();
7676
}
7777

78-
79-
bool hasType() const {
80-
if (auto *AFD = TheFunction.dyn_cast<AbstractFunctionDecl *>())
81-
return AFD->hasInterfaceType();
82-
return !TheFunction.get<AbstractClosureExpr *>()->getType().isNull();
83-
}
84-
8578
ParameterList *getParameters() const {
8679
if (auto *AFD = TheFunction.dyn_cast<AbstractFunctionDecl *>())
8780
return AFD->getParameters();
@@ -174,20 +167,8 @@ class AnyFunctionRef {
174167
return TheFunction.dyn_cast<AbstractClosureExpr*>();
175168
}
176169

177-
/// Return true if this closure is passed as an argument to a function and is
178-
/// known not to escape from that function. In this case, captures can be
179-
/// more efficient.
180-
bool isKnownNoEscape() const {
181-
if (hasType() && !getType()->hasError())
182-
return getType()->castTo<AnyFunctionType>()->isNoEscape();
183-
return false;
184-
}
185-
186170
/// Whether this function is @Sendable.
187171
bool isSendable() const {
188-
if (!hasType())
189-
return false;
190-
191172
if (auto *fnType = getType()->getAs<AnyFunctionType>())
192173
return fnType->isSendable();
193174

0 commit comments

Comments
 (0)