Skip to content

Commit 65fe910

Browse files
committed
[OperandOwnership] @in_constant operands consume.
Match the behavior that MemoryLifetimeVerifier::setFuncOperandBits verifies for addresses for values.
1 parent 806fb74 commit 65fe910

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SIL/IR/OperandOwnership.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,7 @@ static OperandOwnership getFunctionArgOwnership(SILArgumentConvention argConv,
468468

469469
switch (argConv) {
470470
case SILArgumentConvention::Indirect_In:
471+
case SILArgumentConvention::Indirect_In_Constant:
471472
case SILArgumentConvention::Direct_Owned:
472473
return OperandOwnership::ForwardingConsume;
473474

@@ -478,7 +479,6 @@ static OperandOwnership getFunctionArgOwnership(SILArgumentConvention argConv,
478479
// borrow scope in the caller. In contrast, a begin_apply /does/ have an
479480
// explicit borrow scope in the caller so we must treat arguments passed to it
480481
// as being borrowed for the entire region of coroutine execution.
481-
case SILArgumentConvention::Indirect_In_Constant:
482482
case SILArgumentConvention::Indirect_In_Guaranteed:
483483
case SILArgumentConvention::Direct_Guaranteed:
484484
// For an apply that begins a borrow scope, its arguments are borrowed

0 commit comments

Comments
 (0)