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 {
1037
1037
// / guaranteed scope.
1038
1038
bool isLifetimeEnding () const ;
1039
1039
1040
+ // / Returns true if this ends the lifetime of an owned operand.
1041
+ bool isConsuming () const ;
1042
+
1040
1043
SILBasicBlock *getParentBlock () const ;
1041
1044
SILFunction *getParentFunction () const ;
1042
1045
Original file line number Diff line number Diff line change @@ -339,6 +339,13 @@ bool Operand::isLifetimeEnding() const {
339
339
return get ().getOwnershipKind () != OwnershipKind::None;
340
340
}
341
341
342
+ bool Operand::isConsuming () const {
343
+ if (!getOwnershipConstraint ().isConsuming ())
344
+ return false ;
345
+
346
+ return get ().getOwnershipKind () != OwnershipKind::None;
347
+ }
348
+
342
349
// ===----------------------------------------------------------------------===//
343
350
// OperandConstraint
344
351
// ===----------------------------------------------------------------------===//
You can’t perform that action at this time.
0 commit comments