@@ -142,6 +142,18 @@ SHOULD_NEVER_VISIT_INST(StrongRelease)
142
142
#include " swift/AST/ReferenceStorage.def"
143
143
#undef SHOULD_NEVER_VISIT_INST
144
144
145
+ // / Instructions that are interior pointers into a guaranteed value.
146
+ #define INTERIOR_POINTER_PROJECTION (INST ) \
147
+ OperandOwnershipKindMap OperandOwnershipKindClassifier::visit##INST##Inst( \
148
+ INST##Inst *i) { \
149
+ assert (i->getNumOperands () && " Expected to have non-zero operands" ); \
150
+ return Map::compatibilityMap (ValueOwnershipKind::Guaranteed, \
151
+ UseLifetimeConstraint::MustBeLive); \
152
+ }
153
+ INTERIOR_POINTER_PROJECTION (RefElementAddr)
154
+ INTERIOR_POINTER_PROJECTION (RefTailAddr)
155
+ #undef INTERIOR_POINTER_PROJECTION
156
+
145
157
// / Instructions whose arguments are always compatible with one convention.
146
158
#define CONSTANT_OWNERSHIP_INST (OWNERSHIP, USE_LIFETIME_CONSTRAINT, INST ) \
147
159
OperandOwnershipKindMap OperandOwnershipKindClassifier::visit##INST##Inst( \
@@ -151,7 +163,6 @@ SHOULD_NEVER_VISIT_INST(StrongRelease)
151
163
ValueOwnershipKind::OWNERSHIP, \
152
164
UseLifetimeConstraint::USE_LIFETIME_CONSTRAINT); \
153
165
}
154
- CONSTANT_OWNERSHIP_INST (Guaranteed, MustBeLive, RefElementAddr)
155
166
CONSTANT_OWNERSHIP_INST (Guaranteed, MustBeLive, OpenExistentialValue)
156
167
CONSTANT_OWNERSHIP_INST (Guaranteed, MustBeLive, OpenExistentialBoxValue)
157
168
CONSTANT_OWNERSHIP_INST (Owned, MustBeInvalidated, AutoreleaseValue)
@@ -271,7 +282,6 @@ ACCEPTS_ANY_OWNERSHIP_INST(BridgeObjectToWord)
271
282
ACCEPTS_ANY_OWNERSHIP_INST (ClassifyBridgeObject)
272
283
ACCEPTS_ANY_OWNERSHIP_INST (CopyBlock)
273
284
ACCEPTS_ANY_OWNERSHIP_INST (OpenExistentialBox)
274
- ACCEPTS_ANY_OWNERSHIP_INST (RefTailAddr)
275
285
ACCEPTS_ANY_OWNERSHIP_INST (RefToRawPointer)
276
286
ACCEPTS_ANY_OWNERSHIP_INST (SetDeallocating)
277
287
ACCEPTS_ANY_OWNERSHIP_INST (ProjectExistentialBox)
0 commit comments