@@ -3818,13 +3818,17 @@ static CanAnyFunctionType getIVarInitDestroyerInterfaceType(ClassDecl *cd,
3818
3818
}
3819
3819
3820
3820
static CanAnyFunctionType
3821
- getFunctionInterfaceTypeWithCaptures (TypeConverter &TC,
3822
- CanAnyFunctionType funcType,
3823
- SILDeclRef constant) {
3821
+ getAnyFunctionRefInterfaceType (TypeConverter &TC,
3822
+ CanAnyFunctionType funcType,
3823
+ SILDeclRef constant) {
3824
3824
// Get transitive closure of value captured by this function, and any
3825
3825
// captured functions.
3826
3826
auto captureInfo = TC.getLoweredLocalCaptures (constant);
3827
3827
3828
+ LLVM_DEBUG (llvm::dbgs () << " -- capture info: " ;
3829
+ captureInfo.print (llvm::dbgs ());
3830
+ llvm::dbgs () << " \n " );
3831
+
3828
3832
// Capture generic parameters from the enclosing context if necessary.
3829
3833
auto closure = *constant.getAnyFunctionRef ();
3830
3834
auto genericSig = getEffectiveGenericSignature (closure, captureInfo);
@@ -3934,7 +3938,7 @@ CanAnyFunctionType TypeConverter::makeConstantInterfaceType(SILDeclRef c) {
3934
3938
funcTy = cast<AnyFunctionType>(
3935
3939
vd->getInterfaceType ()->getCanonicalType ());
3936
3940
}
3937
- return getFunctionInterfaceTypeWithCaptures (*this , funcTy, c);
3941
+ return getAnyFunctionRefInterfaceType (*this , funcTy, c);
3938
3942
}
3939
3943
3940
3944
case SILDeclRef::Kind::EnumElement: {
@@ -3951,14 +3955,14 @@ CanAnyFunctionType TypeConverter::makeConstantInterfaceType(SILDeclRef c) {
3951
3955
auto *cd = cast<ConstructorDecl>(vd);
3952
3956
auto funcTy = cast<AnyFunctionType>(
3953
3957
cd->getInterfaceType ()->getCanonicalType ());
3954
- return getFunctionInterfaceTypeWithCaptures (*this , funcTy, c);
3958
+ return getAnyFunctionRefInterfaceType (*this , funcTy, c);
3955
3959
}
3956
3960
3957
3961
case SILDeclRef::Kind::Initializer: {
3958
3962
auto *cd = cast<ConstructorDecl>(vd);
3959
3963
auto funcTy = cast<AnyFunctionType>(
3960
3964
cd->getInitializerInterfaceType ()->getCanonicalType ());
3961
- return getFunctionInterfaceTypeWithCaptures (*this , funcTy, c);
3965
+ return getAnyFunctionRefInterfaceType (*this , funcTy, c);
3962
3966
}
3963
3967
3964
3968
case SILDeclRef::Kind::Destroyer:
0 commit comments