@@ -8678,6 +8678,11 @@ class DestroyValueInst
86788678 }
86798679
86808680public:
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+
86818686 // / If true, then all references within the destroyed value will be
86828687 // / overwritten with a sentinel. This is used in debug builds when shortening
86838688 // / non-trivial value lifetimes to ensure the debugger cannot inspect invalid
@@ -8748,11 +8753,12 @@ class MoveValueInst
87488753// / for details. See SILVerifier.cpp for constraints on valid uses.
87498754class DropDeinitInst
87508755 : public UnaryInstructionBase<SILInstructionKind::DropDeinitInst,
8751- SingleValueInstruction > {
8756+ OwnershipForwardingSingleValueInstruction > {
87528757 friend class SILBuilder ;
87538758
87548759 DropDeinitInst (SILDebugLocation DebugLoc, SILValue operand)
8755- : UnaryInstructionBase(DebugLoc, operand, operand->getType ()) {}
8760+ : UnaryInstructionBase(DebugLoc, operand, operand->getType (),
8761+ OwnershipKind::Owned) {}
87568762};
87578763
87588764// / Equivalent to a copy_addr to [init] except that it is used for diagnostics
@@ -11133,6 +11139,7 @@ OwnershipForwardingSingleValueInstruction::classof(SILInstructionKind kind) {
1113311139 case SILInstructionKind::ThinToThickFunctionInst:
1113411140 case SILInstructionKind::UnconditionalCheckedCastInst:
1113511141 case SILInstructionKind::FunctionExtractIsolationInst:
11142+ case SILInstructionKind::DropDeinitInst:
1113611143 return true ;
1113711144 default :
1113811145 return false ;
0 commit comments