@@ -8679,6 +8679,11 @@ class DestroyValueInst
86798679 }
86808680
86818681public:
8682+ // / True if this destroy fully deinitializes the type by invoking the
8683+ // / user-defined deinitializer if present. This returns false if a prior
8684+ // / drop_deinit is present.
8685+ bool isFullDeinitialization ();
8686+
86828687 // / If true, then all references within the destroyed value will be
86838688 // / overwritten with a sentinel. This is used in debug builds when shortening
86848689 // / non-trivial value lifetimes to ensure the debugger cannot inspect invalid
@@ -8749,11 +8754,12 @@ class MoveValueInst
87498754// / for details. See SILVerifier.cpp for constraints on valid uses.
87508755class DropDeinitInst
87518756 : public UnaryInstructionBase<SILInstructionKind::DropDeinitInst,
8752- SingleValueInstruction > {
8757+ OwnershipForwardingSingleValueInstruction > {
87538758 friend class SILBuilder ;
87548759
87558760 DropDeinitInst (SILDebugLocation DebugLoc, SILValue operand)
8756- : UnaryInstructionBase(DebugLoc, operand, operand->getType ()) {}
8761+ : UnaryInstructionBase(DebugLoc, operand, operand->getType (),
8762+ OwnershipKind::Owned) {}
87578763};
87588764
87598765// / Equivalent to a copy_addr to [init] except that it is used for diagnostics
@@ -11134,6 +11140,7 @@ OwnershipForwardingSingleValueInstruction::classof(SILInstructionKind kind) {
1113411140 case SILInstructionKind::ThinToThickFunctionInst:
1113511141 case SILInstructionKind::UnconditionalCheckedCastInst:
1113611142 case SILInstructionKind::FunctionExtractIsolationInst:
11143+ case SILInstructionKind::DropDeinitInst:
1113711144 return true ;
1113811145 default :
1113911146 return false ;
0 commit comments