[Typed throws] Handle throw_addr in the same places as throw.

This commit is contained in:
Doug Gregor
2023-11-03 18:32:23 -07:00
parent 844b46fae5
commit 53c8e84a1f
7 changed files with 12 additions and 9 deletions

View File

@@ -1403,7 +1403,7 @@ public:
return std::find_if(begin(), end(),
[](const SILBasicBlock &BB) -> bool {
const TermInst *TI = BB.getTerminator();
return isa<ThrowInst>(TI);
return isa<ThrowInst>(TI) || isa<ThrowAddrInst>(TI);
});
}
@@ -1413,7 +1413,7 @@ public:
return std::find_if(begin(), end(),
[](const SILBasicBlock &BB) -> bool {
const TermInst *TI = BB.getTerminator();
return isa<ThrowInst>(TI);
return isa<ThrowInst>(TI) || isa<ThrowAddrInst>(TI);
});
}