@@ -1288,7 +1288,41 @@ final public class IsUniqueInst : SingleValueInstruction, UnaryInstruction {}
12881288
12891289final public class DestroyNotEscapedClosureInst : SingleValueInstruction , UnaryInstruction { }
12901290
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+ }
12921326
12931327final public class MarkUnresolvedReferenceBindingInst : SingleValueInstruction { }
12941328
@@ -1404,6 +1438,8 @@ final public class AllocBoxInst : SingleValueInstruction, Allocation, DebugVaria
14041438 public var debugVariable : DebugVariable ? {
14051439 return bridged. AllocBox_hasVarInfo ( ) ? bridged. AllocBox_getVarInfo ( ) : nil
14061440 }
1441+
1442+ public var hasDynamicLifetime : Bool { bridged. AllocBoxInst_hasDynamicLifetime ( ) }
14071443}
14081444
14091445final public class AllocExistentialBoxInst : SingleValueInstruction , Allocation {
0 commit comments