@@ -8678,6 +8678,11 @@ class DestroyValueInst
8678
8678
}
8679
8679
8680
8680
public:
8681
+ // / True if this destroy fully deinitializes the type by invoking the
8682
+ // / user-defined deinitializer if present. This returns false if a prior
8683
+ // / drop_deinit is present.
8684
+ bool isFullDeinitialization ();
8685
+
8681
8686
// / If true, then all references within the destroyed value will be
8682
8687
// / overwritten with a sentinel. This is used in debug builds when shortening
8683
8688
// / non-trivial value lifetimes to ensure the debugger cannot inspect invalid
@@ -8748,11 +8753,12 @@ class MoveValueInst
8748
8753
// / for details. See SILVerifier.cpp for constraints on valid uses.
8749
8754
class DropDeinitInst
8750
8755
: public UnaryInstructionBase<SILInstructionKind::DropDeinitInst,
8751
- SingleValueInstruction > {
8756
+ OwnershipForwardingSingleValueInstruction > {
8752
8757
friend class SILBuilder ;
8753
8758
8754
8759
DropDeinitInst (SILDebugLocation DebugLoc, SILValue operand)
8755
- : UnaryInstructionBase(DebugLoc, operand, operand->getType ()) {}
8760
+ : UnaryInstructionBase(DebugLoc, operand, operand->getType (),
8761
+ OwnershipKind::Owned) {}
8756
8762
};
8757
8763
8758
8764
// / Equivalent to a copy_addr to [init] except that it is used for diagnostics
@@ -11133,6 +11139,7 @@ OwnershipForwardingSingleValueInstruction::classof(SILInstructionKind kind) {
11133
11139
case SILInstructionKind::ThinToThickFunctionInst:
11134
11140
case SILInstructionKind::UnconditionalCheckedCastInst:
11135
11141
case SILInstructionKind::FunctionExtractIsolationInst:
11142
+ case SILInstructionKind::DropDeinitInst:
11136
11143
return true ;
11137
11144
default :
11138
11145
return false ;
0 commit comments