We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 813e0a5 commit 1dde278Copy full SHA for 1dde278
include/swift/SIL/SILFunction.h
@@ -1565,6 +1565,17 @@ class SILFunction
1565
}
1566
1567
1568
+ /// Populate \p output with every block terminated by an unreachable
1569
+ /// instruction.
1570
+ void visitUnreachableTerminatedBlocks(
1571
+ llvm::function_ref<void(SILBasicBlock &)> visitor) const {
1572
+ for (auto &block : const_cast<SILFunction &>(*this)) {
1573
+ if (isa<UnreachableInst>(block.getTerminator())) {
1574
+ visitor(block);
1575
+ }
1576
1577
1578
+
1579
//===--------------------------------------------------------------------===//
1580
// Argument Helper Methods
1581
0 commit comments