File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class SILLocation;
4141class DeadEndBlocks ;
4242class ValueBaseUseIterator ;
4343class ValueUseIterator ;
44+ class SILValue ;
4445
4546// / An enumeration which contains values for all the concrete ValueBase
4647// / subclasses.
@@ -188,6 +189,12 @@ struct ValueOwnershipKind {
188189 return merge (other).hasValue ();
189190 }
190191
192+ // / Returns isCompatibleWith(other.getOwnershipKind()).
193+ // /
194+ // / Definition is inline after SILValue is defined to work around circular
195+ // / dependencies.
196+ bool isCompatibleWith (SILValue other) const ;
197+
191198 template <typename RangeTy>
192199 static Optional<ValueOwnershipKind> merge (RangeTy &&r) {
193200 auto initial = Optional<ValueOwnershipKind>(ValueOwnershipKind::None);
@@ -440,6 +447,10 @@ class SILValue {
440447 void verifyOwnership (DeadEndBlocks *DEBlocks = nullptr ) const ;
441448};
442449
450+ inline bool ValueOwnershipKind::isCompatibleWith (SILValue other) const {
451+ return isCompatibleWith (other.getOwnershipKind ());
452+ }
453+
443454// / A map from a ValueOwnershipKind that an operand can accept to a
444455// / UseLifetimeConstraint that describes the effect that the operand's use has
445456// / on the underlying value. If a ValueOwnershipKind is not in this map then
You can’t perform that action at this time.
0 commit comments