@@ -1231,6 +1231,8 @@ class SyncNativeCCEntryPointArgumentEmission final
1231
1231
class AsyncNativeCCEntryPointArgumentEmission final
1232
1232
: public NativeCCEntryPointArgumentEmission,
1233
1233
public AsyncEntryPointArgumentEmission {
1234
+ llvm::Value *task;
1235
+ llvm::Value *executor;
1234
1236
llvm::Value *context;
1235
1237
/* const*/ AsyncContextLayout layout;
1236
1238
const Address dataAddr;
@@ -1253,6 +1255,7 @@ class AsyncNativeCCEntryPointArgumentEmission final
1253
1255
SILBasicBlock &entry,
1254
1256
Explosion &allParamValues)
1255
1257
: AsyncEntryPointArgumentEmission(IGF, entry, allParamValues),
1258
+ task (allParamValues.claimNext()), executor(allParamValues.claimNext()),
1256
1259
context(allParamValues.claimNext()), layout(getAsyncContextLayout(IGF)),
1257
1260
dataAddr(layout.emitCastTo(IGF, context)){};
1258
1261
@@ -3176,8 +3179,7 @@ static void emitReturnInst(IRGenSILFunction &IGF,
3176
3179
assert (!IGF.IndirectReturn .isValid () &&
3177
3180
" Formally direct results should stay direct results for async "
3178
3181
" functions" );
3179
- Explosion parameters = IGF.collectParameters ();
3180
- llvm::Value *context = parameters.claimNext ();
3182
+ llvm::Value *context = IGF.CurFn ->getArg (2 );
3181
3183
auto layout = getAsyncContextLayout (IGF);
3182
3184
3183
3185
Address dataAddr = layout.emitCastTo (IGF, context);
0 commit comments