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;
41
41
class DeadEndBlocks ;
42
42
class ValueBaseUseIterator ;
43
43
class ValueUseIterator ;
44
+ class SILValue ;
44
45
45
46
// / An enumeration which contains values for all the concrete ValueBase
46
47
// / subclasses.
@@ -188,6 +189,12 @@ struct ValueOwnershipKind {
188
189
return merge (other).hasValue ();
189
190
}
190
191
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
+
191
198
template <typename RangeTy>
192
199
static Optional<ValueOwnershipKind> merge (RangeTy &&r) {
193
200
auto initial = Optional<ValueOwnershipKind>(ValueOwnershipKind::None);
@@ -440,6 +447,10 @@ class SILValue {
440
447
void verifyOwnership (DeadEndBlocks *DEBlocks = nullptr ) const ;
441
448
};
442
449
450
+ inline bool ValueOwnershipKind::isCompatibleWith (SILValue other) const {
451
+ return isCompatibleWith (other.getOwnershipKind ());
452
+ }
453
+
443
454
// / A map from a ValueOwnershipKind that an operand can accept to a
444
455
// / UseLifetimeConstraint that describes the effect that the operand's use has
445
456
// / 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