Skip to content

Commit e9cf2d8

Browse files
Merge pull request #34578 from nate-chandler/concurrency/irgen/forward-task-and-executor-through-partial-apply-forwarder
[Async CC] Forward task and executor through partial apply forwarder.
2 parents e68aa49 + de1c787 commit e9cf2d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/IRGen/GenFunc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,9 +1227,8 @@ class AsyncPartialApplicationForwarderEmission
12271227
}
12281228
llvm::CallInst *createCall(FunctionPointer &fnPtr) override {
12291229
Explosion asyncExplosion;
1230-
asyncExplosion.add(llvm::Constant::getNullValue(subIGF.IGM.SwiftTaskPtrTy));
1231-
asyncExplosion.add(
1232-
llvm::Constant::getNullValue(subIGF.IGM.SwiftExecutorPtrTy));
1230+
asyncExplosion.add(subIGF.getAsyncTask());
1231+
asyncExplosion.add(subIGF.getAsyncExecutor());
12331232
asyncExplosion.add(contextBuffer);
12341233
if (dynamicFunction &&
12351234
dynamicFunction->kind == DynamicFunction::Kind::PartialApply) {
@@ -1308,6 +1307,7 @@ static llvm::Function *emitPartialApplicationForwarder(IRGenModule &IGM,
13081307
fwd->addAttributes(llvm::AttributeList::FunctionIndex, b);
13091308

13101309
IRGenFunction subIGF(IGM, fwd);
1310+
subIGF.setAsync(origType->isAsync());
13111311
if (IGM.DebugInfo)
13121312
IGM.DebugInfo->emitArtificialFunction(subIGF, fwd);
13131313

0 commit comments

Comments
 (0)