Skip to content

Commit 70fb18e

Browse files
committed
SIL: Rename misleading getFunctionInterfaceTypeWithCaptures()
1 parent 04d3d43 commit 70fb18e

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

lib/SIL/IR/TypeLowering.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3818,13 +3818,17 @@ static CanAnyFunctionType getIVarInitDestroyerInterfaceType(ClassDecl *cd,
38183818
}
38193819

38203820
static CanAnyFunctionType
3821-
getFunctionInterfaceTypeWithCaptures(TypeConverter &TC,
3822-
CanAnyFunctionType funcType,
3823-
SILDeclRef constant) {
3821+
getAnyFunctionRefInterfaceType(TypeConverter &TC,
3822+
CanAnyFunctionType funcType,
3823+
SILDeclRef constant) {
38243824
// Get transitive closure of value captured by this function, and any
38253825
// captured functions.
38263826
auto captureInfo = TC.getLoweredLocalCaptures(constant);
38273827

3828+
LLVM_DEBUG(llvm::dbgs() << "-- capture info: ";
3829+
captureInfo.print(llvm::dbgs());
3830+
llvm::dbgs() << "\n");
3831+
38283832
// Capture generic parameters from the enclosing context if necessary.
38293833
auto closure = *constant.getAnyFunctionRef();
38303834
auto genericSig = getEffectiveGenericSignature(closure, captureInfo);
@@ -3934,7 +3938,7 @@ CanAnyFunctionType TypeConverter::makeConstantInterfaceType(SILDeclRef c) {
39343938
funcTy = cast<AnyFunctionType>(
39353939
vd->getInterfaceType()->getCanonicalType());
39363940
}
3937-
return getFunctionInterfaceTypeWithCaptures(*this, funcTy, c);
3941+
return getAnyFunctionRefInterfaceType(*this, funcTy, c);
39383942
}
39393943

39403944
case SILDeclRef::Kind::EnumElement: {
@@ -3951,14 +3955,14 @@ CanAnyFunctionType TypeConverter::makeConstantInterfaceType(SILDeclRef c) {
39513955
auto *cd = cast<ConstructorDecl>(vd);
39523956
auto funcTy = cast<AnyFunctionType>(
39533957
cd->getInterfaceType()->getCanonicalType());
3954-
return getFunctionInterfaceTypeWithCaptures(*this, funcTy, c);
3958+
return getAnyFunctionRefInterfaceType(*this, funcTy, c);
39553959
}
39563960

39573961
case SILDeclRef::Kind::Initializer: {
39583962
auto *cd = cast<ConstructorDecl>(vd);
39593963
auto funcTy = cast<AnyFunctionType>(
39603964
cd->getInitializerInterfaceType()->getCanonicalType());
3961-
return getFunctionInterfaceTypeWithCaptures(*this, funcTy, c);
3965+
return getAnyFunctionRefInterfaceType(*this, funcTy, c);
39623966
}
39633967

39643968
case SILDeclRef::Kind::Destroyer:

0 commit comments

Comments
 (0)