@@ -2818,42 +2818,6 @@ bool ConvertFunctionInst::onlyConvertsSendable() const {
2818
2818
getNonSendableFuncType(getType());
2819
2819
}
2820
2820
2821
- static CanSILFunctionType getDerivedFunctionTypeForHopToMainActorIfNeeded(
2822
- SILFunction *fn, CanSILFunctionType inputFunctionType,
2823
- SubstitutionMap subMap) {
2824
- inputFunctionType = inputFunctionType->substGenericArgs(
2825
- fn->getModule(), subMap, fn->getTypeExpansionContext());
2826
- bool needsSubstFunctionType = false;
2827
- for (auto param : inputFunctionType->getParameters()) {
2828
- needsSubstFunctionType |= param.getInterfaceType()->hasTypeParameter();
2829
- }
2830
- for (auto result : inputFunctionType->getResults()) {
2831
- needsSubstFunctionType |= result.getInterfaceType()->hasTypeParameter();
2832
- }
2833
- for (auto yield : inputFunctionType->getYields()) {
2834
- needsSubstFunctionType |= yield.getInterfaceType()->hasTypeParameter();
2835
- }
2836
-
2837
- SubstitutionMap appliedSubs;
2838
- if (needsSubstFunctionType) {
2839
- appliedSubs = inputFunctionType->getCombinedSubstitutions();
2840
- }
2841
-
2842
- auto extInfoBuilder =
2843
- inputFunctionType->getExtInfo()
2844
- .intoBuilder()
2845
- .withRepresentation(SILFunctionType::Representation::Thick)
2846
- .withIsPseudogeneric(false);
2847
-
2848
- return SILFunctionType::get(
2849
- nullptr, extInfoBuilder.build(), inputFunctionType->getCoroutineKind(),
2850
- ParameterConvention::Direct_Guaranteed,
2851
- inputFunctionType->getParameters(), inputFunctionType->getYields(),
2852
- inputFunctionType->getResults(),
2853
- inputFunctionType->getOptionalErrorResult(), appliedSubs,
2854
- SubstitutionMap(), inputFunctionType->getASTContext());
2855
- }
2856
-
2857
2821
static CanSILFunctionType
2858
2822
getDerivedFunctionTypeForIdentityThunk(SILFunction *fn,
2859
2823
CanSILFunctionType inputFunctionType,
@@ -2906,9 +2870,6 @@ ThunkInst::Kind::getDerivedFunctionType(SILFunction *fn,
2906
2870
case Identity:
2907
2871
return getDerivedFunctionTypeForIdentityThunk(fn, inputFunctionType,
2908
2872
subMap);
2909
- case HopToMainActorIfNeeded:
2910
- return getDerivedFunctionTypeForHopToMainActorIfNeeded(
2911
- fn, inputFunctionType, subMap);
2912
2873
}
2913
2874
2914
2875
llvm_unreachable("Covered switch isn't covered?!");
0 commit comments