@@ -2295,38 +2295,28 @@ struct TargetTypeMetadataRecord {
2295
2295
union {
2296
2296
// / A direct reference to a nominal type descriptor.
2297
2297
RelativeDirectPointerIntPair<TargetContextDescriptor<Runtime>,
2298
- TypeReferenceKind >
2298
+ TypeMetadataRecordKind >
2299
2299
DirectNominalTypeDescriptor;
2300
2300
2301
2301
// / An indirect reference to a nominal type descriptor.
2302
2302
RelativeDirectPointerIntPair<TargetSignedPointer<Runtime, TargetContextDescriptor<Runtime> * __ptrauth_swift_type_descriptor>,
2303
- TypeReferenceKind >
2303
+ TypeMetadataRecordKind >
2304
2304
IndirectNominalTypeDescriptor;
2305
-
2306
- // We only allow a subset of the TypeReferenceKinds here.
2307
- // Should we just acknowledge that this is a different enum?
2308
2305
};
2309
2306
2310
2307
public:
2311
- TypeReferenceKind getTypeKind () const {
2308
+ TypeMetadataRecordKind getTypeKind () const {
2312
2309
return DirectNominalTypeDescriptor.getInt ();
2313
2310
}
2314
2311
2315
2312
const TargetContextDescriptor<Runtime> *
2316
2313
getContextDescriptor () const {
2317
2314
switch (getTypeKind ()) {
2318
- case TypeReferenceKind ::DirectTypeDescriptor:
2315
+ case TypeMetadataRecordKind ::DirectTypeDescriptor:
2319
2316
return DirectNominalTypeDescriptor.getPointer ();
2320
2317
2321
- case TypeReferenceKind ::IndirectTypeDescriptor:
2318
+ case TypeMetadataRecordKind ::IndirectTypeDescriptor:
2322
2319
return *IndirectNominalTypeDescriptor.getPointer ();
2323
-
2324
- // These types (and any others we might add to TypeReferenceKind
2325
- // in the future) are just never used in these lists.
2326
- case TypeReferenceKind::DirectObjCClassName:
2327
- case TypeReferenceKind::IndirectObjCClass:
2328
- case TypeReferenceKind::MetadataKind:
2329
- return nullptr ;
2330
2320
}
2331
2321
2332
2322
return nullptr ;
0 commit comments