Skip to content

Commit 4eb6859

Browse files
committed
SIL: Tweak ownership of continuation instructions.
Treating a trivial type as having ownership seems only to confuse the ownership verifier. The structural property we're trying to enforce here (that a continuation is always consumed by an `await` locally) can be enforced by flow-sensitive verification without ownership.
1 parent a922121 commit 4eb6859

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/SIL/IR/OperandOwnership.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ CONSTANT_OWNERSHIP_INST(Owned, MustBeInvalidated, DestroyValue)
176176
CONSTANT_OWNERSHIP_INST(Owned, MustBeInvalidated, EndLifetime)
177177
CONSTANT_OWNERSHIP_INST(Owned, MustBeInvalidated, BeginCOWMutation)
178178
CONSTANT_OWNERSHIP_INST(Owned, MustBeInvalidated, EndCOWMutation)
179-
CONSTANT_OWNERSHIP_INST(Owned, MustBeLive, AwaitAsyncContinuation)
179+
CONSTANT_OWNERSHIP_INST(None, MustBeLive, AwaitAsyncContinuation)
180180
CONSTANT_OWNERSHIP_INST(None, MustBeLive, AbortApply)
181181
CONSTANT_OWNERSHIP_INST(None, MustBeLive, AddressToPointer)
182182
CONSTANT_OWNERSHIP_INST(None, MustBeLive, BeginAccess)

lib/SIL/IR/ValueOwnership.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ CONSTANT_OWNERSHIP_INST(Unowned, RawPointerToRef)
149149
CONSTANT_OWNERSHIP_INST(Unowned, ObjCProtocol)
150150
CONSTANT_OWNERSHIP_INST(Unowned, ValueToBridgeObject)
151151
CONSTANT_OWNERSHIP_INST(None, GetAsyncContinuation)
152-
CONSTANT_OWNERSHIP_INST(Unowned, GetAsyncContinuationAddr)
152+
CONSTANT_OWNERSHIP_INST(None, GetAsyncContinuationAddr)
153153
CONSTANT_OWNERSHIP_INST(None, ThinToThickFunction)
154154
#undef CONSTANT_OWNERSHIP_INST
155155

0 commit comments

Comments
 (0)