Skip to content

Commit 87829aa

Browse files
committed
[move-only] Rename CheckKind::NoCopy -> CheckKind::NoConsumeOrAssign.
This reflects better the true meaning of this check which is that a value marked with this check cannot be consumed on its boundary at all (when performing let/var checking) and cannot be assigned over when performing var checking.
1 parent 72f9c3f commit 87829aa

13 files changed

+83
-78
lines changed

docs/SIL.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2660,7 +2660,7 @@ which codegens to the following SIL::
26602660
bb0(%0 : @noImplicitCopy $Klass):
26612661
%1 = copyable_to_moveonlywrapper [guaranteed] %0 : $@moveOnly Klass
26622662
%2 = copy_value %1 : $@moveOnly Klass
2663-
%3 = mark_must_check [no_copy] %2 : $@moveOnly Klass
2663+
%3 = mark_must_check [no_consume_or_assign] %2 : $@moveOnly Klass
26642664
debug_value %3 : $@moveOnly Klass, let, name "x", argno 1
26652665
%4 = begin_borrow %3 : $@moveOnly Klass
26662666
%5 = function_ref @$s4test5KlassC11doSomethingyyF : $@convention(method) (@guaranteed Klass) -> ()
@@ -7824,7 +7824,7 @@ mark_must_check
78247824
'[' sil-optimizer-analysis-marker ']'
78257825

78267826
sil-optimizer-analysis-marker ::= 'no_implicit_copy'
7827-
::= 'no_copy'
7827+
::= 'no_consume_or_assign'
78287828

78297829
A canary value inserted by a SIL generating frontend to signal to the move
78307830
checker to check a specific value. Valid only in Raw SIL. The relevant checkers
@@ -7835,8 +7835,8 @@ instruction by varying the kind.
78357835

78367836
If the sil optimizer analysis marker is ``no_implicit_copy`` then the move
78377837
checker is told to check that the result of this instruction is consumed at most
7838-
once. If the marker is ``no_copy``, then the move checker will validate that the
7839-
result of this instruction is never consumed.
7838+
once. If the marker is ``no_consume_or_assign``, then the move checker will
7839+
validate that the result of this instruction is never consumed or assigned over.
78407840

78417841
No Implicit Copy and No Escape Value Instructions
78427842
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

include/swift/SIL/SILInstruction.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8213,10 +8213,11 @@ class MarkMustCheckInst
82138213
// consumed at most once.
82148214
NoImplicitCopy,
82158215

8216-
// A signal to the move only checker ot perform no copy checking. This
8217-
// forces the result of this instruction owned value to never be consumed
8218-
// (still allowing for non-consuming uses of course).
8219-
NoCopy,
8216+
// A signal to the move only checker to perform no consume or assign
8217+
// checking. This forces the result of this instruction owned value to never
8218+
// be consumed (for let/var semantics) or assigned over (for var
8219+
// semantics). Of course, we still allow for non-consuming uses.
8220+
NoConsumeOrAssign,
82208221
};
82218222

82228223
private:
@@ -8240,7 +8241,7 @@ class MarkMustCheckInst
82408241
case CheckKind::Invalid:
82418242
return false;
82428243
case CheckKind::NoImplicitCopy:
8243-
case CheckKind::NoCopy:
8244+
case CheckKind::NoConsumeOrAssign:
82448245
return true;
82458246
}
82468247
}

lib/SIL/IR/SILPrinter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,8 +1995,8 @@ class SILPrinter : public SILInstructionVisitor<SILPrinter> {
19951995
case CheckKind::NoImplicitCopy:
19961996
*this << "[no_implicit_copy] ";
19971997
break;
1998-
case CheckKind::NoCopy:
1999-
*this << "[no_copy] ";
1998+
case CheckKind::NoConsumeOrAssign:
1999+
*this << "[no_consume_or_assign] ";
20002000
break;
20012001
}
20022002
*this << getIDAndType(I->getOperand());

lib/SIL/Parser/ParseSIL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3663,7 +3663,7 @@ bool SILParser::parseSpecificSILInstruction(SILBuilder &B,
36633663
using CheckKind = MarkMustCheckInst::CheckKind;
36643664
CheckKind CKind = llvm::StringSwitch<CheckKind>(AttrName)
36653665
.Case("no_implicit_copy", CheckKind::NoImplicitCopy)
3666-
.Case("no_copy", CheckKind::NoCopy)
3666+
.Case("no_consume_or_assign", CheckKind::NoConsumeOrAssign)
36673667
.Default(CheckKind::Invalid);
36683668

36693669
if (CKind == CheckKind::Invalid) {

lib/SILGen/SILGenProlog.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ struct ArgumentInitHelper {
330330
assert(value->getOwnershipKind() == OwnershipKind::Guaranteed);
331331
value = SGF.B.createCopyValue(loc, value);
332332
value = SGF.B.createMarkMustCheckInst(
333-
loc, value, MarkMustCheckInst::CheckKind::NoCopy);
333+
loc, value, MarkMustCheckInst::CheckKind::NoConsumeOrAssign);
334334
SGF.emitManagedRValueWithCleanup(value);
335335
return value;
336336
}
@@ -341,7 +341,7 @@ struct ArgumentInitHelper {
341341

342342
// If our argument was owned, we use no implicit copy. Otherwise, we
343343
// use no copy.
344-
auto kind = MarkMustCheckInst::CheckKind::NoCopy;
344+
auto kind = MarkMustCheckInst::CheckKind::NoConsumeOrAssign;
345345
if (pd->isOwned())
346346
kind = MarkMustCheckInst::CheckKind::NoImplicitCopy;
347347
value = SGF.B.createMarkMustCheckInst(loc, value, kind);
@@ -353,7 +353,7 @@ struct ArgumentInitHelper {
353353
value = SGF.B.createGuaranteedCopyableToMoveOnlyWrapperValue(loc, value);
354354
value = SGF.B.createCopyValue(loc, value);
355355
value = SGF.B.createMarkMustCheckInst(
356-
loc, value, MarkMustCheckInst::CheckKind::NoCopy);
356+
loc, value, MarkMustCheckInst::CheckKind::NoConsumeOrAssign);
357357
SGF.emitManagedRValueWithCleanup(value);
358358
return value;
359359
}
@@ -547,14 +547,14 @@ static void emitCaptureArguments(SILGenFunction &SGF,
547547
val = addr->getManagedAddress();
548548
}
549549

550-
// If this constant is a move only type, we need to add no_copy checking to
550+
// If this constant is a move only type, we need to add no_consume_or_assign checking to
551551
// ensure that we do not consume this captured value in the function. This
552552
// is because closures can be invoked multiple times which is inconsistent
553553
// with consuming the move only type.
554554
if (val.getType().isMoveOnly()) {
555555
val = val.ensurePlusOne(SGF, Loc);
556-
val = SGF.B.createMarkMustCheckInst(Loc, val,
557-
MarkMustCheckInst::CheckKind::NoCopy);
556+
val = SGF.B.createMarkMustCheckInst(
557+
Loc, val, MarkMustCheckInst::CheckKind::NoConsumeOrAssign);
558558
}
559559

560560
SGF.VarLocs[VD] = SILGenFunction::VarLoc::get(val.getValue());

lib/SILOptimizer/Mandatory/MoveOnlyAddressChecker.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,8 @@ bool GatherUsesVisitor::visitUse(Operand *op, AccessUseType useTy) {
10811081
assert(op->getOperandNumber() == CopyAddrInst::Src &&
10821082
"Should have dest above in memInstMust{Rei,I}nitialize");
10831083

1084-
if (markedValue->getCheckKind() == MarkMustCheckInst::CheckKind::NoCopy) {
1084+
if (markedValue->getCheckKind() ==
1085+
MarkMustCheckInst::CheckKind::NoConsumeOrAssign) {
10851086
LLVM_DEBUG(llvm::dbgs()
10861087
<< "Found mark must check [nocopy] error: " << *user);
10871088
diagnosticEmitter.emitAddressDiagnosticNoCopy(markedValue, copyAddr);
@@ -1159,7 +1160,8 @@ bool GatherUsesVisitor::visitUse(Operand *op, AccessUseType useTy) {
11591160
// If we are asked to perform guaranteed checking, emit an error if we
11601161
// have /any/ consuming uses. This is a case that can always be converted
11611162
// to a load_borrow if we pass the check.
1162-
if (markedValue->getCheckKind() == MarkMustCheckInst::CheckKind::NoCopy) {
1163+
if (markedValue->getCheckKind() ==
1164+
MarkMustCheckInst::CheckKind::NoConsumeOrAssign) {
11631165
if (!moveChecker.canonicalizer.foundAnyConsumingUses()) {
11641166
LLVM_DEBUG(llvm::dbgs()
11651167
<< "Found mark must check [nocopy] error: " << *user);

lib/SILOptimizer/Mandatory/MoveOnlyObjectChecker.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ bool swift::siloptimizer::searchForCandidateObjectMarkMustChecks(
8787
//
8888
// bb0(%0 : @guaranteed $T):
8989
// %1 = copy_value %0
90-
// %2 = mark_must_check [no_copy] %1
90+
// %2 = mark_must_check [no_consume_or_assign] %1
9191
// bb0(%0 : @owned $T):
92-
// %1 = mark_must_check [no_copy] %2
92+
// %1 = mark_must_check [no_consume_or_assign] %2
9393
//
9494
// This is forming a let or an argument.
9595
// bb0:
@@ -100,7 +100,7 @@ bool swift::siloptimizer::searchForCandidateObjectMarkMustChecks(
100100
// bb0:
101101
// %1 = begin_borrow [lexical] %0
102102
// %2 = copy_value %1
103-
// %3 = mark_must_check [no_copy] %2
103+
// %3 = mark_must_check [no_consume_or_assign] %2
104104
if (mmci->getOperand()->getType().isMoveOnly() &&
105105
!mmci->getOperand()->getType().isMoveOnlyWrapped()) {
106106
if (auto *cvi = dyn_cast<CopyValueInst>(mmci->getOperand())) {
@@ -142,7 +142,7 @@ bool swift::siloptimizer::searchForCandidateObjectMarkMustChecks(
142142
// bb0(%0 : @guaranteed $T):
143143
// %1 = copyable_to_moveonlywrapper [guaranteed] %0
144144
// %2 = copy_value %1
145-
// %3 = mark_must_check [no_copy] %2
145+
// %3 = mark_must_check [no_consume_or_assign] %2
146146
//
147147
// NOTE: Unlike with owned arguments, we do not need to insert a
148148
// begin_borrow lexical since the lexical value comes from the guaranteed
@@ -177,7 +177,7 @@ bool swift::siloptimizer::searchForCandidateObjectMarkMustChecks(
177177
// bb0(%0 : $Trivial):
178178
// %1 = copyable_to_moveonlywrapper [owned] %0
179179
// %2 = move_value [lexical] %1
180-
// %3 = mark_must_check [no_copy] %2
180+
// %3 = mark_must_check [no_consume_or_assign] %2
181181
//
182182
// We are relying on a structural SIL requirement that %0 has only one
183183
// use, %1. This is validated by the SIL verifier. In this case, we need
@@ -684,7 +684,8 @@ void MoveOnlyChecker::check(DominanceInfo *domTree, PostOrderAnalysis *poa) {
684684
// If we are asked to perform guaranteed checking, emit an error if we have
685685
// /any/ consuming boundary uses or uses that need copies and then rewrite
686686
// lifetimes.
687-
if (markedValue->getCheckKind() == MarkMustCheckInst::CheckKind::NoCopy) {
687+
if (markedValue->getCheckKind() ==
688+
MarkMustCheckInst::CheckKind::NoConsumeOrAssign) {
688689
if (canonicalizer.foundAnyConsumingUses()) {
689690
diagnosticEmitter.emitObjectGuaranteedDiagnostic(markedValue);
690691
}
@@ -728,7 +729,8 @@ void MoveOnlyChecker::check(DominanceInfo *domTree, PostOrderAnalysis *poa) {
728729
// If we didn't emit a diagnostic on a non-trivial guaranteed argument,
729730
// eliminate the copy_value, destroy_values, and the mark_must_check.
730731
if (!diagnosticEmitter.emittedDiagnosticForValue(markedInst)) {
731-
if (markedInst->getCheckKind() == MarkMustCheckInst::CheckKind::NoCopy) {
732+
if (markedInst->getCheckKind() ==
733+
MarkMustCheckInst::CheckKind::NoConsumeOrAssign) {
732734
if (auto *cvi = dyn_cast<CopyValueInst>(markedInst->getOperand())) {
733735
SingleValueInstruction *i = cvi;
734736
if (auto *copyToMoveOnly =

test/SILGen/moveonly.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public func consumeVal(_ s: __owned NonTrivialStruct2) {}
8989
// CHECK-LABEL: sil [ossa] @$s8moveonly8useKlassyyAA0C0CF : $@convention(thin) (@guaranteed Klass) -> () {
9090
// CHECK: bb0([[ARG:%.*]] : @guaranteed $Klass):
9191
// CHECK: [[OWNED_ARG:%.*]] = copy_value [[ARG]]
92-
// CHECK: [[MARKED_OWNED_ARG:%.*]] = mark_must_check [no_copy] [[OWNED_ARG]]
92+
// CHECK: [[MARKED_OWNED_ARG:%.*]] = mark_must_check [no_consume_or_assign] [[OWNED_ARG]]
9393
// CHECK: } // end sil function '$s8moveonly8useKlassyyAA0C0CF'
9494
public func useKlass(_ k: Klass) {
9595
borrowVal(k)
@@ -114,7 +114,7 @@ public func useKlassConsume(_ k: __owned Klass) {
114114
// CHECK-LABEL: sil [ossa] @$s8moveonly19useNonTrivialStructyyAA0cdE0VF : $@convention(thin) (@guaranteed NonTrivialStruct) -> () {
115115
// CHECK: bb0([[ARG:%.*]] : @guaranteed $NonTrivialStruct):
116116
// CHECK: [[COPIED_ARG:%.*]] = copy_value [[ARG]]
117-
// CHECK: mark_must_check [no_copy] [[COPIED_ARG]]
117+
// CHECK: mark_must_check [no_consume_or_assign] [[COPIED_ARG]]
118118
// CHECK: } // end sil function '$s8moveonly19useNonTrivialStructyyAA0cdE0VF'
119119
public func useNonTrivialStruct(_ s: NonTrivialStruct) {
120120
borrowVal(s)
@@ -142,7 +142,7 @@ public func useNonTrivialOwnedStruct(_ s: __owned NonTrivialStruct) {
142142
// CHECK-LABEL: sil [ossa] @$s8moveonly17useNonTrivialEnumyyAA0cdE0OF : $@convention(thin) (@guaranteed NonTrivialEnum) -> () {
143143
// CHECK: bb0([[ARG:%.*]] : @guaranteed $NonTrivialEnum):
144144
// CHECK: [[COPIED_ARG:%.*]] = copy_value [[ARG]]
145-
// CHECK: mark_must_check [no_copy] [[COPIED_ARG]]
145+
// CHECK: mark_must_check [no_consume_or_assign] [[COPIED_ARG]]
146146
// CHECK: } // end sil function '$s8moveonly17useNonTrivialEnumyyAA0cdE0OF'
147147
public func useNonTrivialEnum(_ s: NonTrivialEnum) {
148148
borrowVal(s)
@@ -183,7 +183,7 @@ extension Klass {
183183
// CHECK-LABEL: sil hidden [ossa] @$s8moveonly5KlassC13testNoUseSelfyyF : $@convention(method) (@guaranteed Klass) -> () {
184184
// CHECK: bb0([[ARG:%.*]] : @guaranteed $Klass):
185185
// CHECK: [[COPIED_ARG:%.*]] = copy_value [[ARG]]
186-
// CHECK: mark_must_check [no_copy] [[COPIED_ARG]]
186+
// CHECK: mark_must_check [no_consume_or_assign] [[COPIED_ARG]]
187187
// CHECK: } // end sil function '$s8moveonly5KlassC13testNoUseSelfyyF'
188188
func testNoUseSelf() {
189189
let x = self
@@ -195,7 +195,7 @@ extension NonTrivialStruct {
195195
// CHECK-LABEL: sil hidden [ossa] @$s8moveonly16NonTrivialStructV13testNoUseSelfyyF : $@convention(method) (@guaranteed NonTrivialStruct) -> () {
196196
// CHECK: bb0([[ARG:%.*]] : @guaranteed $NonTrivialStruct):
197197
// CHECK: [[COPIED_ARG:%.*]] = copy_value [[ARG]]
198-
// CHECK: mark_must_check [no_copy] [[COPIED_ARG]]
198+
// CHECK: mark_must_check [no_consume_or_assign] [[COPIED_ARG]]
199199
// CHECK: } // end sil function '$s8moveonly16NonTrivialStructV13testNoUseSelfyyF'
200200
func testNoUseSelf() {
201201
let x = self
@@ -207,7 +207,7 @@ extension NonTrivialEnum {
207207
// CHECK-LABEL: sil hidden [ossa] @$s8moveonly14NonTrivialEnumO13testNoUseSelfyyF : $@convention(method) (@guaranteed NonTrivialEnum) -> () {
208208
// CHECK: bb0([[ARG:%.*]] : @guaranteed $NonTrivialEnum):
209209
// CHECK: [[COPIED_ARG:%.*]] = copy_value [[ARG]]
210-
// CHECK: mark_must_check [no_copy] [[COPIED_ARG]]
210+
// CHECK: mark_must_check [no_consume_or_assign] [[COPIED_ARG]]
211211
// CHECK: } // end sil function '$s8moveonly14NonTrivialEnumO13testNoUseSelfyyF'
212212
func testNoUseSelf() {
213213
let x = self
@@ -612,7 +612,7 @@ var booleanGuard2: Bool { false }
612612
// CHECK-LABEL: sil hidden [ossa] @$s8moveonly15enumSwitchTest1yyAA04EnumC5TestsO1EOF : $@convention(thin) (@guaranteed EnumSwitchTests.E) -> () {
613613
// CHECK: bb0([[ARG:%.*]] : @guaranteed
614614
// CHECK: [[COPY_ARG:%.*]] = copy_value [[ARG]]
615-
// CHECK: [[MARKED_VALUE:%.*]] = mark_must_check [no_copy] [[COPY_ARG]]
615+
// CHECK: [[MARKED_VALUE:%.*]] = mark_must_check [no_consume_or_assign] [[COPY_ARG]]
616616
// CHECK: [[BORROWED_VALUE:%.*]] = begin_borrow [[MARKED_VALUE]]
617617
// CHECK: switch_enum [[BORROWED_VALUE]] : $EnumSwitchTests.E, case #EnumSwitchTests.E.first!enumelt: [[BB_E_1:bb[0-9]+]], case #EnumSwitchTests.E.second!enumelt: [[BB_E_2:bb[0-9]+]], case #EnumSwitchTests.E.third!enumelt: [[BB_E_3:bb[0-9]+]], case #EnumSwitchTests.E.fourth!enumelt: [[BB_E_4:bb[0-9]+]]
618618
//

test/SILGen/noimplicitcopy.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func printInt() {
7171
// CHECK: bb0([[ARG:%.*]] : @noImplicitCopy $Int):
7272
// CHECK: [[ARG_WRAPPED:%.*]] = copyable_to_moveonlywrapper [owned] [[ARG]]
7373
// CHECK: [[LEXICAL_ARG:%.*]] = move_value [lexical] [[ARG_WRAPPED]]
74-
// CHECK: [[MARKED_ARG:%.*]] = mark_must_check [no_copy] [[LEXICAL_ARG]]
74+
// CHECK: [[MARKED_ARG:%.*]] = mark_must_check [no_consume_or_assign] [[LEXICAL_ARG]]
7575
// CHECK: [[BORROWED_MARKED_ARG_1:%.*]] = begin_borrow [[MARKED_ARG]]
7676
// CHECK: [[BORROWED_MARKED_ARG_2:%.*]] = begin_borrow [[MARKED_ARG]]
7777
// CHECK: [[FUNC:%.*]] = function_ref @$sSi1poiyS2i_SitFZ : $@convention(method) (Int, Int, @thin Int.Type) -> Int
@@ -169,7 +169,7 @@ func callPrintIntOwnedArg() {
169169
// CHECK: bb0([[ARG:%.*]] : @noImplicitCopy $Int):
170170
// CHECK: [[ARG_WRAPPED:%.*]] = copyable_to_moveonlywrapper [owned] [[ARG]]
171171
// CHECK: [[LEXICAL_ARG:%.*]] = move_value [lexical] [[ARG_WRAPPED]]
172-
// CHECK: [[MARKED_ARG:%.*]] = mark_must_check [no_copy] [[LEXICAL_ARG]]
172+
// CHECK: [[MARKED_ARG:%.*]] = mark_must_check [no_consume_or_assign] [[LEXICAL_ARG]]
173173
// CHECK: [[BORROWED_MARKED_ARG_1:%.*]] = begin_borrow [[MARKED_ARG]]
174174
// CHECK: [[BORROWED_MARKED_ARG_2:%.*]] = begin_borrow [[MARKED_ARG]]
175175
// CHECK: [[FUNC:%.*]] = function_ref @$sSi1poiyS2i_SitFZ : $@convention(method) (Int, Int, @thin Int.Type) -> Int
@@ -262,7 +262,7 @@ func useClosureInt(_ f: (Int) -> ()) {}
262262
// CHECK: bb0([[X:%.*]] : @noImplicitCopy $Int):
263263
// CHECK: [[WRAPPED_X:%.*]] = copyable_to_moveonlywrapper [owned] [[X]]
264264
// CHECK: [[MOVED_X:%.*]] = move_value [lexical] [[WRAPPED_X]]
265-
// CHECK: [[MARKED_X:%.*]] = mark_must_check [no_copy] [[MOVED_X]]
265+
// CHECK: [[MARKED_X:%.*]] = mark_must_check [no_consume_or_assign] [[MOVED_X]]
266266
// CHECK: [[BORROWED_X_MARKED_1:%.*]] = begin_borrow [[MARKED_X]]
267267
// CHECK: [[BORROWED_X_MARKED_2:%.*]] = begin_borrow [[MARKED_X]]
268268
// CHECK: [[FUNC:%.*]] = function_ref @$sSi1poiyS2i_SitFZ : $@convention(method) (Int, Int, @thin Int.Type) -> Int
@@ -367,7 +367,7 @@ func printKlass() {
367367
// CHECK: bb0([[ARG:%.*]] : @noImplicitCopy @guaranteed $Klass):
368368
// CHECK: [[WRAPPED_ARG:%.*]] = copyable_to_moveonlywrapper [guaranteed] [[ARG]]
369369
// CHECK: [[COPIED_WRAPPED_ARG:%.*]] = copy_value [[WRAPPED_ARG]]
370-
// CHECK: [[MARKED_ARG:%.*]] = mark_must_check [no_copy] [[COPIED_WRAPPED_ARG]]
370+
// CHECK: [[MARKED_ARG:%.*]] = mark_must_check [no_consume_or_assign] [[COPIED_WRAPPED_ARG]]
371371
// CHECK: } // end sil function '$s14noimplicitcopy13printKlassArgyyAA0C0CF'
372372
//
373373
// SIL-LABEL: sil hidden @$s14noimplicitcopy13printKlassArgyyAA0C0CF : $@convention(thin) (@guaranteed Klass) -> () {
@@ -419,7 +419,7 @@ func callPrintKlassOwnedArg() {
419419
// CHECK: bb0([[ARG:%.*]] : @noImplicitCopy @guaranteed $Klass):
420420
// CHECK: [[WRAPPED_ARG:%.*]] = copyable_to_moveonlywrapper [guaranteed] [[ARG]]
421421
// CHECK: [[COPIED_ARG:%.*]] = copy_value [[WRAPPED_ARG]]
422-
// CHECK: [[MARKED_ARG:%.*]] = mark_must_check [no_copy] [[COPIED_ARG]]
422+
// CHECK: [[MARKED_ARG:%.*]] = mark_must_check [no_consume_or_assign] [[COPIED_ARG]]
423423
// CHECK: [[BORROWED_MARKED_ARG:%.*]] = begin_borrow [[MARKED_ARG]]
424424
// CHECK: [[UNWRAPPED_ARG:%.*]] = moveonlywrapper_to_copyable [guaranteed] [[BORROWED_MARKED_ARG]]
425425
// CHECK: apply {{%.*}}([[UNWRAPPED_ARG]]) :

0 commit comments

Comments
 (0)