SIL: make var OperandArray.values available for all kind of operand sequences

This commit is contained in:
Erik Eckstein
2025-10-05 16:14:19 +02:00
parent 876fd514b0
commit c3612bafb8
7 changed files with 12 additions and 12 deletions

View File

@@ -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 {