File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1037,6 +1037,9 @@ class Operand {
10371037 // / guaranteed scope.
10381038 bool isLifetimeEnding () const ;
10391039
1040+ // / Returns true if this ends the lifetime of an owned operand.
1041+ bool isConsuming () const ;
1042+
10401043 SILBasicBlock *getParentBlock () const ;
10411044 SILFunction *getParentFunction () const ;
10421045
Original file line number Diff line number Diff line change @@ -339,6 +339,13 @@ bool Operand::isLifetimeEnding() const {
339339 return get ().getOwnershipKind () != OwnershipKind::None;
340340}
341341
342+ bool Operand::isConsuming () const {
343+ if (!getOwnershipConstraint ().isConsuming ())
344+ return false ;
345+
346+ return get ().getOwnershipKind () != OwnershipKind::None;
347+ }
348+
342349// ===----------------------------------------------------------------------===//
343350// OperandConstraint
344351// ===----------------------------------------------------------------------===//
You can’t perform that action at this time.
0 commit comments