@@ -1397,6 +1397,11 @@ class AllocationInst : public SingleValueInstruction {
1397
1397
1398
1398
public:
1399
1399
DEFINE_ABSTRACT_SINGLE_VALUE_INST_BOILERPLATE (AllocationInst)
1400
+
1401
+ // / Return the underlying variable declaration associated with this
1402
+ // / allocation, or null if this allocation inst is associated with a temporary
1403
+ // / allocation.
1404
+ VarDecl *getDecl () const ;
1400
1405
};
1401
1406
1402
1407
class DeallocStackInst ;
@@ -1439,10 +1444,6 @@ class AllocStackInst final
1439
1444
void setDynamicLifetime () { dynamicLifetime = true ; }
1440
1445
bool hasDynamicLifetime () const { return dynamicLifetime; }
1441
1446
1442
- // / Return the underlying variable declaration associated with this
1443
- // / allocation, or null if this is a temporary allocation.
1444
- VarDecl *getDecl () const ;
1445
-
1446
1447
// / Return the debug variable information attached to this instruction.
1447
1448
Optional<SILDebugVariable> getVarInfo () const {
1448
1449
auto RawValue = SILInstruction::Bits.AllocStackInst .VarInfo ;
@@ -1685,10 +1686,6 @@ class AllocBoxInst final
1685
1686
// Return the type of the memory stored in the alloc_box.
1686
1687
SILType getAddressType () const ;
1687
1688
1688
- // / Return the underlying variable declaration associated with this
1689
- // / allocation, or null if this is a temporary allocation.
1690
- VarDecl *getDecl () const ;
1691
-
1692
1689
// / Return the debug variable information attached to this instruction.
1693
1690
Optional<SILDebugVariable> getVarInfo () const {
1694
1691
return VarInfo.get (getDecl (), getTrailingObjects<char >());
0 commit comments