@@ -76,12 +76,10 @@ inline bool isForwardingConsume(SILValue value) {
76
76
}
77
77
78
78
class ForwardingOperand {
79
- Operand *use;
80
-
81
- ForwardingOperand (Operand *use) : use(use) {}
79
+ Operand *use = nullptr ;
82
80
83
81
public:
84
- static ForwardingOperand get (Operand *use);
82
+ explicit ForwardingOperand (Operand *use);
85
83
86
84
OwnershipConstraint getOwnershipConstraint () const {
87
85
// We use a force unwrap since a ForwardingOperand should always have an
@@ -665,25 +663,26 @@ struct InteriorPointerOperand {
665
663
llvm_unreachable (" Covered switch isn't covered?!" );
666
664
}
667
665
668
- // / Compute the list of implicit uses that this interior pointer operand puts
669
- // / on its parent guaranted value.
666
+ // / Transitively compute the list of uses that this interior pointer operand
667
+ // / puts on its parent guaranted value.
670
668
// /
671
669
// / Example: Uses of a ref_element_addr can not occur outside of the lifetime
672
670
// / of the instruction's operand. The uses of that address act as liveness
673
671
// / requirements to ensure that the underlying class is alive at all use
674
672
// / points.
675
- bool getImplicitUses (SmallVectorImpl<Operand *> &foundUses,
676
- std::function<void (Operand *)> *onError = nullptr) {
677
- return getImplicitUsesForAddress (getProjectedAddress (), foundUses, onError);
673
+ bool findTransitiveUses (SmallVectorImpl<Operand *> &foundUses,
674
+ std::function<void (Operand *)> *onError = nullptr) {
675
+ return findTransitiveUsesForAddress (getProjectedAddress (), foundUses,
676
+ onError);
678
677
}
679
678
680
679
// / The algorithm that is used to determine what the verifier will consider to
681
- // / be implicit uses of the given address. Used to implement \see
682
- // / getImplicitUses .
680
+ // / be transitive uses of the given address. Used to implement \see
681
+ // / findTransitiveUses .
683
682
static bool
684
- getImplicitUsesForAddress (SILValue address,
685
- SmallVectorImpl<Operand *> &foundUses,
686
- std::function<void (Operand *)> *onError = nullptr );
683
+ findTransitiveUsesForAddress (SILValue address,
684
+ SmallVectorImpl<Operand *> &foundUses,
685
+ std::function<void (Operand *)> *onError = nullptr );
687
686
688
687
Operand *operator ->() { return operand; }
689
688
const Operand *operator ->() const { return operand; }
0 commit comments