Skip to content

Commit 0e59dde

Browse files
committed
Swift SIL: add the TermInst.isFunctionExiting property
1 parent bfb284f commit 0e59dde

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,21 +689,26 @@ public class TermInst : Instruction {
689689
final public var successors: SuccessorArray {
690690
SuccessorArray(succArray: TermInst_getSuccessors(bridged))
691691
}
692+
693+
public var isFunctionExiting: Bool { false }
692694
}
693695

694696
final public class UnreachableInst : TermInst {
695697
}
696698

697699
final public class ReturnInst : TermInst, UnaryInstruction {
700+
public override var isFunctionExiting: Bool { true }
698701
}
699702

700703
final public class ThrowInst : TermInst, UnaryInstruction {
704+
public override var isFunctionExiting: Bool { true }
701705
}
702706

703707
final public class YieldInst : TermInst {
704708
}
705709

706710
final public class UnwindInst : TermInst {
711+
public override var isFunctionExiting: Bool { true }
707712
}
708713

709714
final public class TryApplyInst : TermInst, FullApplySite {

0 commit comments

Comments
 (0)