mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SIL: make var OperandArray.values available for all kind of operand sequences
This commit is contained in:
@@ -104,10 +104,6 @@ public struct OperandArray : RandomAccessCollection, CustomReflectable {
|
||||
base: OptionalBridgedOperand(op: base.advancedBy(bounds.lowerBound).op),
|
||||
count: bounds.upperBound - bounds.lowerBound)
|
||||
}
|
||||
|
||||
public var values: LazyMapSequence<LazySequence<OperandArray>.Elements, Value> {
|
||||
self.lazy.map { $0.value }
|
||||
}
|
||||
}
|
||||
|
||||
public struct UseList : CollectionLikeSequence {
|
||||
@@ -143,6 +139,10 @@ public struct UseList : CollectionLikeSequence {
|
||||
}
|
||||
|
||||
extension Sequence where Element == Operand {
|
||||
public var values: LazyMapSequence<Self, Value> {
|
||||
self.lazy.map { $0.value }
|
||||
}
|
||||
|
||||
public var singleUse: Operand? {
|
||||
var result: Operand? = nil
|
||||
for op in self {
|
||||
|
||||
Reference in New Issue
Block a user