@@ -856,42 +856,6 @@ class IRGenSILFunction :
856
856
}
857
857
}
858
858
859
- llvm::Value *getAsyncTask () override {
860
- // FIXME: (1) Remove this override, (2) mark the IRGenFunction::getAsyncTask
861
- // declaration as non-virtual, and (3) mark IRGenFunction's
862
- // destructor non-virtual once Task.runDetached is available.
863
- // rdar://problem/70597390*/
864
- if (CurSILFn->getLoweredFunctionType ()->getRepresentation () ==
865
- SILFunctionTypeRepresentation::CFunctionPointer) {
866
- return llvm::Constant::getNullValue (IGM.SwiftTaskPtrTy );
867
- }
868
- return IRGenFunction::getAsyncTask ();
869
- }
870
-
871
- llvm::Value *getAsyncExecutor () override {
872
- // FIXME: (1) Remove this override, (2) mark the
873
- // IRGenFunction::getAsyncExecutor declaration as non-virtual, and
874
- // (3) mark IRGenFunction's destructor non-virtual once
875
- // Task.runDetached is available. rdar://problem/70597390*/
876
- if (CurSILFn->getLoweredFunctionType ()->getRepresentation () ==
877
- SILFunctionTypeRepresentation::CFunctionPointer) {
878
- return llvm::Constant::getNullValue (IGM.SwiftExecutorPtrTy );
879
- }
880
- return IRGenFunction::getAsyncExecutor ();
881
- }
882
-
883
- llvm::Value *getAsyncContext () override {
884
- // FIXME: (1) Remove this override, (2) mark the
885
- // IRGenFunction::getAsyncContext declaration as non-virtual, and
886
- // (3) mark IRGenFunction's destructor non-virtual once
887
- // Task.runDetached is available. rdar://problem/70597390*/
888
- if (CurSILFn->getLoweredFunctionType ()->getRepresentation () ==
889
- SILFunctionTypeRepresentation::CFunctionPointer) {
890
- return llvm::Constant::getNullValue (IGM.SwiftContextPtrTy );
891
- }
892
- return IRGenFunction::getAsyncContext ();
893
- }
894
-
895
859
// ===--------------------------------------------------------------------===//
896
860
// SIL instruction lowering
897
861
// ===--------------------------------------------------------------------===//
@@ -1440,11 +1404,7 @@ std::unique_ptr<COrObjCEntryPointArgumentEmission>
1440
1404
getCOrObjCEntryPointArgumentEmission (IRGenSILFunction &IGF,
1441
1405
SILBasicBlock &entry,
1442
1406
Explosion &allParamValues) {
1443
- if (IGF.CurSILFn ->isAsync () &&
1444
- !(/* FIXME: Remove this condition once Task.runDetached is
1445
- available. rdar://problem/70597390*/
1446
- IGF.CurSILFn ->getLoweredFunctionType ()->getRepresentation () ==
1447
- SILFunctionTypeRepresentation::CFunctionPointer)) {
1407
+ if (IGF.CurSILFn ->isAsync ()) {
1448
1408
llvm_unreachable (" unsupported" );
1449
1409
} else {
1450
1410
return std::make_unique<SyncCOrObjCEntryPointArgumentEmission>(
@@ -3250,12 +3210,7 @@ static void emitReturnInst(IRGenSILFunction &IGF,
3250
3210
auto &retTI = cast<LoadableTypeInfo>(IGF.getTypeInfo (resultTy));
3251
3211
retTI.initialize (IGF, result, IGF.IndirectReturn , false );
3252
3212
IGF.Builder .CreateRetVoid ();
3253
- } else if (IGF.isAsync () &&
3254
- !(/* FIXME: Remove this condition once Task.runDetached is
3255
- available. rdar://problem/70597390*/
3256
- IGF.CurSILFn ->getLoweredFunctionType ()
3257
- ->getRepresentation () ==
3258
- SILFunctionTypeRepresentation::CFunctionPointer)) {
3213
+ } else if (IGF.isAsync ()) {
3259
3214
// If we're generating an async function, store the result into the buffer.
3260
3215
assert (!IGF.IndirectReturn .isValid () &&
3261
3216
" Formally direct results should stay direct results for async "
0 commit comments