mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: add a utility function to check if a terminator exits a function. NFC
This commit is contained in:
@@ -837,7 +837,7 @@ class AllocBoxToStack : public SILFunctionTransform {
|
||||
|
||||
for (auto &BB : *getFunction()) {
|
||||
auto *Term = BB.getTerminator();
|
||||
if (isa<ReturnInst>(Term) || isa<ThrowInst>(Term))
|
||||
if (Term->isFunctionExiting())
|
||||
Returns.push_back(Term);
|
||||
|
||||
for (auto &I : BB)
|
||||
|
||||
Reference in New Issue
Block a user