Skip to content

Commit 631ff2a

Browse files
committed
Revert "Merge pull request #80350 from drexin/wip-147872231-6.1"
This reverts commit aa6f1d5, reversing changes made to 0414cb2.
1 parent c581445 commit 631ff2a

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

lib/IRGen/GenCall.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -6346,12 +6346,10 @@ void irgen::emitAsyncReturn(IRGenFunction &IGF, AsyncContextLayout &asyncLayout,
63466346
if (combinedTy->isVoidTy()) {
63476347
assert(result.empty() && "Unexpected result values");
63486348
} else {
6349-
Explosion native = nativeSchema.mapIntoNative(
6350-
IGM, IGF, result, funcResultTypeInContext, /*isOutlined*/ false);
63516349
if (auto *structTy = dyn_cast<llvm::StructType>(combinedTy)) {
63526350
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();
63556353
auto *nativeTy = structTy->getElementType(i);
63566354
elt = convertForDirectError(IGF, elt, nativeTy,
63576355
/*forExtraction*/ false);
@@ -6362,9 +6360,9 @@ void irgen::emitAsyncReturn(IRGenFunction &IGF, AsyncContextLayout &asyncLayout,
63626360
while (!out.empty()) {
63636361
nativeResultsStorage.push_back(out.claimNext());
63646362
}
6365-
} else if (!native.empty()) {
6363+
} else if (!result.empty()) {
63666364
auto *converted = convertForDirectError(
6367-
IGF, native.claimNext(), combinedTy, /*forExtraction*/ false);
6365+
IGF, result.claimNext(), combinedTy, /*forExtraction*/ false);
63686366
nativeResultsStorage.push_back(converted);
63696367
} else {
63706368
nativeResultsStorage.push_back(llvm::UndefValue::get(combinedTy));

test/IRGen/typed_throws.swift

-10
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,3 @@ func callSmallErrorLargerResult() {
349349
}
350350
}
351351
}
352-
353-
struct SomeStruct {
354-
let x: Int
355-
let y: UInt32
356-
let z: UInt32
357-
}
358-
359-
func someFunc() async throws(SmallError) -> SomeStruct {
360-
SomeStruct(x: 42, y: 23, z: 25)
361-
}

0 commit comments

Comments
 (0)