@@ -2295,38 +2295,28 @@ struct TargetTypeMetadataRecord {
22952295 union {
22962296 // / A direct reference to a nominal type descriptor.
22972297 RelativeDirectPointerIntPair<TargetContextDescriptor<Runtime>,
2298- TypeReferenceKind >
2298+ TypeMetadataRecordKind >
22992299 DirectNominalTypeDescriptor;
23002300
23012301 // / An indirect reference to a nominal type descriptor.
23022302 RelativeDirectPointerIntPair<TargetSignedPointer<Runtime, TargetContextDescriptor<Runtime> * __ptrauth_swift_type_descriptor>,
2303- TypeReferenceKind >
2303+ TypeMetadataRecordKind >
23042304 IndirectNominalTypeDescriptor;
2305-
2306- // We only allow a subset of the TypeReferenceKinds here.
2307- // Should we just acknowledge that this is a different enum?
23082305 };
23092306
23102307public:
2311- TypeReferenceKind getTypeKind () const {
2308+ TypeMetadataRecordKind getTypeKind () const {
23122309 return DirectNominalTypeDescriptor.getInt ();
23132310 }
23142311
23152312 const TargetContextDescriptor<Runtime> *
23162313 getContextDescriptor () const {
23172314 switch (getTypeKind ()) {
2318- case TypeReferenceKind ::DirectTypeDescriptor:
2315+ case TypeMetadataRecordKind ::DirectTypeDescriptor:
23192316 return DirectNominalTypeDescriptor.getPointer ();
23202317
2321- case TypeReferenceKind ::IndirectTypeDescriptor:
2318+ case TypeMetadataRecordKind ::IndirectTypeDescriptor:
23222319 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 ;
23302320 }
23312321
23322322 return nullptr ;
0 commit comments