@@ -1288,7 +1288,41 @@ final public class IsUniqueInst : SingleValueInstruction, UnaryInstruction {}
1288
1288
1289
1289
final public class DestroyNotEscapedClosureInst : SingleValueInstruction , UnaryInstruction { }
1290
1290
1291
- final public class MarkUnresolvedNonCopyableValueInst : SingleValueInstruction , UnaryInstruction { }
1291
+ final public class MarkUnresolvedNonCopyableValueInst : SingleValueInstruction , UnaryInstruction {
1292
+ // The raw values must match swift::MarkUnresolvedNonCopyableValueInst::CheckKind
1293
+ public enum CheckKind : Int {
1294
+ case invalid = 0
1295
+
1296
+ /// A signal to the move only checker to perform checking that allows for
1297
+ /// this value to be consumed along its boundary (in the case of let/var
1298
+ /// semantics) and also written over in the case of var semantics. NOTE: Of
1299
+ /// course this still implies the value cannot be copied and can be consumed
1300
+ /// only once along all program paths.
1301
+ case consumableAndAssignable
1302
+
1303
+ /// A signal to the move only checker to perform no consume or assign
1304
+ /// checking. This forces the result of this instruction owned value to
1305
+ /// never be consumed (for let/var semantics) or assigned over (for var
1306
+ /// semantics). Of course, we still allow for non-consuming uses.
1307
+ case noConsumeOrAssign
1308
+
1309
+ /// A signal to the move checker that the given value cannot be consumed,
1310
+ /// but is allowed to be assigned over. This is used for situations like
1311
+ /// global_addr/ref_element_addr/closure escape where we do not want to
1312
+ /// allow for the user to take the value (leaving the memory in an
1313
+ /// uninitialized state), but we are ok with the user assigning a new value,
1314
+ /// completely assigning over the value at once.
1315
+ case assignableButNotConsumable
1316
+
1317
+ /// A signal to the move checker that the given value cannot be consumed or
1318
+ /// assigned, but is allowed to be initialized. This is used for situations
1319
+ /// like class initializers.
1320
+ case initableButNotConsumable
1321
+ }
1322
+
1323
+ var checkKind : CheckKind { CheckKind ( rawValue: bridged. MarkUnresolvedNonCopyableValue_getCheckKind ( ) ) ! }
1324
+ var isStrict : Bool { bridged. MarkUnresolvedNonCopyableValue_isStrict ( ) }
1325
+ }
1292
1326
1293
1327
final public class MarkUnresolvedReferenceBindingInst : SingleValueInstruction { }
1294
1328
@@ -1404,6 +1438,8 @@ final public class AllocBoxInst : SingleValueInstruction, Allocation, DebugVaria
1404
1438
public var debugVariable : DebugVariable ? {
1405
1439
return bridged. AllocBox_hasVarInfo ( ) ? bridged. AllocBox_getVarInfo ( ) : nil
1406
1440
}
1441
+
1442
+ public var hasDynamicLifetime : Bool { bridged. AllocBoxInst_hasDynamicLifetime ( ) }
1407
1443
}
1408
1444
1409
1445
final public class AllocExistentialBoxInst : SingleValueInstruction , Allocation {
0 commit comments