Skip to content

Commit 6ab2f2e

Browse files
Merge pull request #5260 from swiftwasm/release/5.8
[pull] swiftwasm-release/5.8 from release/5.8
2 parents 9c1e37e + b86cc30 commit 6ab2f2e

File tree

5 files changed

+9
-1
lines changed

5 files changed

+9
-1
lines changed

include/swift/SIL/SILBuilder.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ class SILBuilder {
745745

746746
BeginBorrowInst *createBeginBorrow(SILLocation Loc, SILValue LV,
747747
bool isLexical = false) {
748+
assert(getFunction().hasOwnership());
748749
assert(!LV->getType().isAddress());
749750
return insert(new (getModule())
750751
BeginBorrowInst(getSILDebugLocation(Loc), LV, isLexical));

lib/SILOptimizer/Utils/SILInliner.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ class BeginApplySite {
171171
// which require an @guaranteed operand into which we'd be attempting to
172172
// substitute an @owned operand.
173173
if (calleeYields[i]->getOwnershipKind() == OwnershipKind::Owned &&
174-
!yield->getOperandRef(i).isConsuming()) {
174+
!yield->getOperandRef(i).isConsuming() &&
175+
Builder->getFunction().hasOwnership()) {
175176
auto *bbi = Builder->createBeginBorrow(Loc, remappedYield);
176177
guaranteedYields.push_back(bbi);
177178
remappedYield = bbi;

test/Concurrency/Runtime/async_taskgroup_discarding.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// REQUIRES: executable_test
55
// REQUIRES: concurrency_runtime
66

7+
// REQUIRES: rdar104762037
8+
79
// rdar://78109470
810
// UNSUPPORTED: back_deployment_runtime
911

test/Concurrency/Runtime/async_taskgroup_discarding_neverConsumingTasks.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// REQUIRES: concurrency
44
// REQUIRES: concurrency_runtime
55

6+
// REQUIRES: rdar104762037
7+
68
// UNSUPPORTED: back_deployment_runtime
79
// UNSUPPORTED: OS=linux-gnu
810

test/Concurrency/Runtime/async_taskgroup_throw_rethrow.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// REQUIRES: concurrency
55
// REQUIRES: reflection
66

7+
// REQUIRES: rdar104762037
8+
79
// rdar://76038845
810
// REQUIRES: concurrency_runtime
911
// UNSUPPORTED: back_deployment_runtime

0 commit comments

Comments
 (0)