FunctionOrder: consider destructor calls for destroy_value

We already do this for `strong_release` and `release_value`, but `destroy_value` was missing
This commit is contained in:
Erik Eckstein
2022-01-20 18:40:41 +01:00
parent d8bf949582
commit 07f2ec3500

View File

@@ -40,7 +40,8 @@ void BottomUpFunctionOrder::DFS(SILFunction *Start) {
for (auto &B : *Start) {
for (auto &I : B) {
auto FAS = FullApplySite::isa(&I);
if (!FAS && !isa<StrongReleaseInst>(&I) && !isa<ReleaseValueInst>(&I))
if (!FAS && !isa<StrongReleaseInst>(&I) && !isa<ReleaseValueInst>(&I) &&
!isa<DestroyValueInst>(&I))
continue;
auto Callees = FAS ? BCA->getCalleeList(FAS)