IRGen: Initialize the executor field in continuation contexts again.

Fixes rdar://75783864.
This commit is contained in:
Joe Groff
2021-03-24 13:34:45 -07:00
parent eb17c2db5d
commit 0f395e347d
5 changed files with 52 additions and 6 deletions

View File

@@ -593,8 +593,11 @@ void IRGenFunction::emitGetAsyncContinuation(SILType resumeTy,
contResultAddr->getType()->getPointerElementType()),
Address(contResultAddr, pointerAlignment));
}
// FIXME:
// continuation_context.resumeExecutor = // current executor
auto executorAddr =
Builder.CreateStructGEP(continuationContext.getAddress(), 4);
auto executor = Builder.CreateCall(IGM.getTaskGetCurrentExecutorFn(), {});
executorAddr = Builder.CreateBitCast(executorAddr, executor->getType()->getPointerTo());
Builder.CreateStore(executor, executorAddr, pointerAlignment);
// Fill the current task (i.e the continuation) with the continuation
// information.