Skip to content

Commit 07f2ec3

Browse files
committed
FunctionOrder: consider destructor calls for destroy_value
We already do this for `strong_release` and `release_value`, but `destroy_value` was missing
1 parent d8bf949 commit 07f2ec3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/SILOptimizer/Analysis/FunctionOrder.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ void BottomUpFunctionOrder::DFS(SILFunction *Start) {
4040
for (auto &B : *Start) {
4141
for (auto &I : B) {
4242
auto FAS = FullApplySite::isa(&I);
43-
if (!FAS && !isa<StrongReleaseInst>(&I) && !isa<ReleaseValueInst>(&I))
43+
if (!FAS && !isa<StrongReleaseInst>(&I) && !isa<ReleaseValueInst>(&I) &&
44+
!isa<DestroyValueInst>(&I))
4445
continue;
4546

4647
auto Callees = FAS ? BCA->getCalleeList(FAS)

0 commit comments

Comments
 (0)