@@ -7619,6 +7619,18 @@ class DeallocStackInst :
76197619 : UnaryInstructionBase(DebugLoc, operand) {}
76207620};
76217621
7622+ // / Like DeallocStackInst, but for `alloc_ref [stack]`.
7623+ class DeallocStackRefInst
7624+ : public UnaryInstructionBase<SILInstructionKind::DeallocStackRefInst,
7625+ DeallocationInst> {
7626+ friend SILBuilder;
7627+
7628+ DeallocStackRefInst (SILDebugLocation DebugLoc, SILValue Operand)
7629+ : UnaryInstructionBase(DebugLoc, Operand) {}
7630+ public:
7631+ AllocRefInst *getAllocRef () { return cast<AllocRefInst>(getOperand ()); }
7632+ };
7633+
76227634// / Deallocate memory for a reference type instance from a destructor or
76237635// / failure path of a constructor.
76247636// /
@@ -7632,21 +7644,8 @@ class DeallocRefInst :
76327644 DeallocationInst> {
76337645 friend SILBuilder;
76347646
7635- private:
7636- DeallocRefInst (SILDebugLocation DebugLoc, SILValue Operand,
7637- bool canBeOnStack = false )
7638- : UnaryInstructionBase(DebugLoc, Operand) {
7639- SILNode::Bits.DeallocRefInst .OnStack = canBeOnStack;
7640- }
7641-
7642- public:
7643- bool canAllocOnStack () const {
7644- return SILNode::Bits.DeallocRefInst .OnStack ;
7645- }
7646-
7647- void setStackAllocatable (bool OnStack) {
7648- SILNode::Bits.DeallocRefInst .OnStack = OnStack;
7649- }
7647+ DeallocRefInst (SILDebugLocation DebugLoc, SILValue Operand)
7648+ : UnaryInstructionBase(DebugLoc, Operand) { }
76507649};
76517650
76527651// / Deallocate memory for a reference type instance from a failure path of a
0 commit comments