@@ -72,16 +72,17 @@ class DestroyPackCleanup : public Cleanup {
72
72
class PartialDestroyPackCleanup : public Cleanup {
73
73
SILValue Addr;
74
74
unsigned PackComponentIndex;
75
+
76
+ // / NOTE: It is expected that LimitWithinComponent maybe an empty SILValue.
75
77
SILValue LimitWithinComponent;
76
78
CanPackType FormalPackType;
77
79
public:
78
- PartialDestroyPackCleanup (SILValue addr,
79
- CanPackType formalPackType,
80
+ PartialDestroyPackCleanup (SILValue addr, CanPackType formalPackType,
80
81
unsigned packComponentIndex,
81
82
SILValue limitWithinComponent)
82
- : Addr(addr), PackComponentIndex(packComponentIndex),
83
- LimitWithinComponent (limitWithinComponent),
84
- FormalPackType(formalPackType) {}
83
+ : Addr(addr), PackComponentIndex(packComponentIndex),
84
+ LimitWithinComponent (limitWithinComponent),
85
+ FormalPackType(formalPackType) {}
85
86
86
87
void emit (SILGenFunction &SGF, CleanupLocation l,
87
88
ForUnwind_t forUnwind) override {
@@ -93,10 +94,14 @@ class PartialDestroyPackCleanup : public Cleanup {
93
94
#ifndef NDEBUG
94
95
llvm::errs () << " PartialDestroyPackCleanup\n "
95
96
<< " State:" << getState () << " \n "
96
- << " Addr:" << Addr << " \n "
97
- << " FormalPackType: " << FormalPackType << " \n "
97
+ << " Addr:" << Addr << " FormalPackType: " << FormalPackType
98
+ << " \n "
98
99
<< " ComponentIndex:" << PackComponentIndex << " \n "
99
- << " LimitWithinComponent:" << LimitWithinComponent << " \n " ;
100
+ << " LimitWithinComponent: " ;
101
+ if (LimitWithinComponent)
102
+ llvm::errs () << LimitWithinComponent;
103
+ else
104
+ llvm::errs () << " None\n " ;
100
105
#endif
101
106
}
102
107
};
0 commit comments