@@ -6346,12 +6346,10 @@ void irgen::emitAsyncReturn(IRGenFunction &IGF, AsyncContextLayout &asyncLayout,
6346
6346
if (combinedTy->isVoidTy ()) {
6347
6347
assert (result.empty () && " Unexpected result values" );
6348
6348
} else {
6349
- Explosion native = nativeSchema.mapIntoNative (
6350
- IGM, IGF, result, funcResultTypeInContext, /* isOutlined*/ false );
6351
6349
if (auto *structTy = dyn_cast<llvm::StructType>(combinedTy)) {
6352
6350
llvm::Value *nativeAgg = llvm::UndefValue::get (structTy);
6353
- for (unsigned i = 0 , e = native .size (); i < e; ++i) {
6354
- llvm::Value *elt = native .claimNext ();
6351
+ for (unsigned i = 0 , e = result .size (); i < e; ++i) {
6352
+ llvm::Value *elt = result .claimNext ();
6355
6353
auto *nativeTy = structTy->getElementType (i);
6356
6354
elt = convertForDirectError (IGF, elt, nativeTy,
6357
6355
/* forExtraction*/ false );
@@ -6362,9 +6360,9 @@ void irgen::emitAsyncReturn(IRGenFunction &IGF, AsyncContextLayout &asyncLayout,
6362
6360
while (!out.empty ()) {
6363
6361
nativeResultsStorage.push_back (out.claimNext ());
6364
6362
}
6365
- } else if (!native .empty ()) {
6363
+ } else if (!result .empty ()) {
6366
6364
auto *converted = convertForDirectError (
6367
- IGF, native .claimNext (), combinedTy, /* forExtraction*/ false );
6365
+ IGF, result .claimNext (), combinedTy, /* forExtraction*/ false );
6368
6366
nativeResultsStorage.push_back (converted);
6369
6367
} else {
6370
6368
nativeResultsStorage.push_back (llvm::UndefValue::get (combinedTy));
0 commit comments