@@ -7619,6 +7619,18 @@ class DeallocStackInst :
7619
7619
: UnaryInstructionBase(DebugLoc, operand) {}
7620
7620
};
7621
7621
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
+
7622
7634
// / Deallocate memory for a reference type instance from a destructor or
7623
7635
// / failure path of a constructor.
7624
7636
// /
@@ -7632,21 +7644,8 @@ class DeallocRefInst :
7632
7644
DeallocationInst> {
7633
7645
friend SILBuilder;
7634
7646
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) { }
7650
7649
};
7651
7650
7652
7651
// / Deallocate memory for a reference type instance from a failure path of a
0 commit comments