diff --git a/include/swift/ABI/Metadata.h b/include/swift/ABI/Metadata.h index ba2afed47ad25..c805f265c5714 100644 --- a/include/swift/ABI/Metadata.h +++ b/include/swift/ABI/Metadata.h @@ -56,12 +56,24 @@ template struct TargetOpaqueMetadata; template struct TargetValueMetadata; template struct TargetForeignClassMetadata; template struct TargetForeignReferenceTypeMetadata; -template struct TargetContextDescriptor; -template class TargetTypeContextDescriptor; -template class TargetClassDescriptor; -template class TargetValueTypeDescriptor; -template class TargetEnumDescriptor; -template class TargetStructDescriptor; +template +struct swift_ptrauth_struct_context_descriptor(ContextDescriptor) + TargetContextDescriptor; +template +class swift_ptrauth_struct_context_descriptor(TypeContextDescriptor) + TargetTypeContextDescriptor; +template +class swift_ptrauth_struct_context_descriptor(ClassDescriptor) + TargetClassDescriptor; +template +class swift_ptrauth_struct_context_descriptor(ValueTypeDescriptor) + TargetValueTypeDescriptor; +template +class swift_ptrauth_struct_context_descriptor(EnumDescriptor) + TargetEnumDescriptor; +template +class swift_ptrauth_struct_context_descriptor(StructDescriptor) + TargetStructDescriptor; template struct TargetGenericMetadataPattern; template struct TargetProtocolConformanceDescriptor; @@ -1632,7 +1644,9 @@ TargetTupleTypeMetadata::getOffsetToNumElements() -> StoredSize { return offsetof(TargetTupleTypeMetadata, NumElements); } -template struct TargetProtocolDescriptor; +template +struct swift_ptrauth_struct_context_descriptor(ProtocolDescriptor) + TargetProtocolDescriptor; /// A protocol requirement descriptor. This describes a single protocol /// requirement in a protocol descriptor. The index of the requirement in @@ -1660,7 +1674,9 @@ struct TargetProtocolRequirement { using ProtocolRequirement = TargetProtocolRequirement; -template struct TargetProtocolDescriptor; +template +struct swift_ptrauth_struct_context_descriptor(ProtocolDescriptor) + TargetProtocolDescriptor; using ProtocolDescriptor = TargetProtocolDescriptor; template