Skip to content

Commit 8d90daf

Browse files
committed
Swift SIL: add Function.reversedInstructions
1 parent 3645bec commit 8d90daf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

SwiftCompilerSources/Sources/SIL/Function.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ final public class Function : CustomStringConvertible, HasShortDescription, Hash
5555
blocks.lazy.flatMap { $0.instructions }
5656
}
5757

58+
public var reversedInstructions: LazySequence<FlattenSequence<LazyMapSequence<ReverseBasicBlockList, ReverseInstructionList>>> {
59+
blocks.reversed().lazy.flatMap { $0.instructions.reversed() }
60+
}
61+
5862
/// The number of indirect result arguments.
5963
public var numIndirectResultArguments: Int {
6064
SILFunction_numIndirectResultArguments(bridged)

0 commit comments

Comments
 (0)