@@ -56,12 +56,24 @@ template <typename Runtime> struct TargetOpaqueMetadata;
56
56
template <typename Runtime> struct TargetValueMetadata ;
57
57
template <typename Runtime> struct TargetForeignClassMetadata ;
58
58
template <typename Runtime> struct TargetForeignReferenceTypeMetadata ;
59
- template <typename Runtime> struct TargetContextDescriptor ;
60
- template <typename Runtime> class TargetTypeContextDescriptor ;
61
- template <typename Runtime> class TargetClassDescriptor ;
62
- template <typename Runtime> class TargetValueTypeDescriptor ;
63
- template <typename Runtime> class TargetEnumDescriptor ;
64
- template <typename Runtime> class TargetStructDescriptor ;
59
+ template <typename Runtime>
60
+ struct swift_ptrauth_struct_context_descriptor (ContextDescriptor)
61
+ TargetContextDescriptor;
62
+ template <typename Runtime>
63
+ class swift_ptrauth_struct_context_descriptor (TypeContextDescriptor)
64
+ TargetTypeContextDescriptor;
65
+ template <typename Runtime>
66
+ class swift_ptrauth_struct_context_descriptor (ClassDescriptor)
67
+ TargetClassDescriptor;
68
+ template <typename Runtime>
69
+ class swift_ptrauth_struct_context_descriptor (ValueTypeDescriptor)
70
+ TargetValueTypeDescriptor;
71
+ template <typename Runtime>
72
+ class swift_ptrauth_struct_context_descriptor (EnumDescriptor)
73
+ TargetEnumDescriptor;
74
+ template <typename Runtime>
75
+ class swift_ptrauth_struct_context_descriptor (StructDescriptor)
76
+ TargetStructDescriptor;
65
77
template <typename Runtime> struct TargetGenericMetadataPattern ;
66
78
template <typename Runtime> struct TargetProtocolConformanceDescriptor ;
67
79
@@ -1632,7 +1644,9 @@ TargetTupleTypeMetadata<Runtime>::getOffsetToNumElements() -> StoredSize {
1632
1644
return offsetof (TargetTupleTypeMetadata<Runtime>, NumElements);
1633
1645
}
1634
1646
1635
- template <typename Runtime> struct TargetProtocolDescriptor ;
1647
+ template <typename Runtime>
1648
+ struct swift_ptrauth_struct_context_descriptor (ProtocolDescriptor)
1649
+ TargetProtocolDescriptor;
1636
1650
1637
1651
// / A protocol requirement descriptor. This describes a single protocol
1638
1652
// / requirement in a protocol descriptor. The index of the requirement in
@@ -1660,7 +1674,9 @@ struct TargetProtocolRequirement {
1660
1674
1661
1675
using ProtocolRequirement = TargetProtocolRequirement<InProcess>;
1662
1676
1663
- template <typename Runtime> struct TargetProtocolDescriptor ;
1677
+ template <typename Runtime>
1678
+ struct swift_ptrauth_struct_context_descriptor (ProtocolDescriptor)
1679
+ TargetProtocolDescriptor;
1664
1680
using ProtocolDescriptor = TargetProtocolDescriptor<InProcess>;
1665
1681
1666
1682
template <template <typename Runtime> class ObjCInteropKind , unsigned PointerSize>
@@ -2803,12 +2819,14 @@ using ExternalProtocolConformanceDescriptor = TargetProtocolConformanceDescripto
2803
2819
template <template <typename Runtime> class ObjCInteropKind , unsigned PointerSize>
2804
2820
using ExternalProtocolConformanceRecord = TargetProtocolConformanceRecord<External<ObjCInteropKind<RuntimeTarget<PointerSize>>>>;
2805
2821
2806
- template <typename Runtime>
2807
- struct TargetModuleContextDescriptor ;
2822
+ template <typename Runtime>
2823
+ struct swift_ptrauth_struct_context_descriptor (ModuleContextDescriptor)
2824
+ TargetModuleContextDescriptor;
2808
2825
2809
2826
// / Base class for all context descriptors.
2810
- template <typename Runtime>
2811
- struct TargetContextDescriptor {
2827
+ template <typename Runtime>
2828
+ struct swift_ptrauth_struct_context_descriptor (ContextDescriptor)
2829
+ TargetContextDescriptor {
2812
2830
// / Flags describing the context, including its kind and format version.
2813
2831
ContextDescriptorFlags Flags;
2814
2832
@@ -2864,8 +2882,9 @@ inline bool isCImportedModuleName(llvm::StringRef name) {
2864
2882
}
2865
2883
2866
2884
// / Descriptor for a module context.
2867
- template <typename Runtime>
2868
- struct TargetModuleContextDescriptor final : TargetContextDescriptor<Runtime> {
2885
+ template <typename Runtime>
2886
+ struct swift_ptrauth_struct_context_descriptor (ModuleContextDescriptor)
2887
+ TargetModuleContextDescriptor final : TargetContextDescriptor<Runtime> {
2869
2888
// / The module name.
2870
2889
RelativeDirectPointer<const char , /* nullable*/ false > Name;
2871
2890
@@ -2905,8 +2924,9 @@ TargetContextDescriptor<Runtime>::getModuleContext() const {
2905
2924
}
2906
2925
2907
2926
// / Descriptor for an extension context.
2908
- template <typename Runtime>
2909
- struct TargetExtensionContextDescriptor final
2927
+ template <typename Runtime>
2928
+ struct swift_ptrauth_struct_context_descriptor (ExtensionContextDescriptor)
2929
+ TargetExtensionContextDescriptor final
2910
2930
: TargetContextDescriptor<Runtime>,
2911
2931
TrailingGenericContextObjects<TargetExtensionContextDescriptor<Runtime>>
2912
2932
{
@@ -2944,8 +2964,9 @@ struct TargetMangledContextName {
2944
2964
TargetRelativeDirectPointer<Runtime, const char , /* nullable*/ false > name;
2945
2965
};
2946
2966
2947
- template <typename Runtime>
2948
- struct TargetAnonymousContextDescriptor final
2967
+ template <typename Runtime>
2968
+ struct swift_ptrauth_struct_context_descriptor (AnonymousContextDescriptor)
2969
+ TargetAnonymousContextDescriptor final
2949
2970
: TargetContextDescriptor<Runtime>,
2950
2971
TrailingGenericContextObjects<TargetAnonymousContextDescriptor<Runtime>,
2951
2972
TargetGenericContextDescriptorHeader,
@@ -3025,8 +3046,9 @@ using ExternalAnonymousContextDescriptor = TargetAnonymousContextDescriptor<Exte
3025
3046
// / Only Swift protocols are defined by a protocol descriptor, whereas
3026
3047
// / Objective-C (including protocols defined in Swift as @objc) use the
3027
3048
// / Objective-C protocol layout.
3028
- template <typename Runtime>
3029
- struct TargetProtocolDescriptor final
3049
+ template <typename Runtime>
3050
+ struct swift_ptrauth_struct_context_descriptor (ProtocolDescriptor)
3051
+ TargetProtocolDescriptor final
3030
3052
: TargetContextDescriptor<Runtime>,
3031
3053
swift::ABI::TrailingObjects<
3032
3054
TargetProtocolDescriptor<Runtime>,
@@ -3114,11 +3136,12 @@ struct TargetProtocolDescriptor final
3114
3136
return cd->getKind () == ContextDescriptorKind::Protocol;
3115
3137
}
3116
3138
};
3117
-
3139
+
3118
3140
// / The descriptor for an opaque type.
3119
3141
template <typename Runtime>
3120
- struct TargetOpaqueTypeDescriptor final
3121
- : TargetContextDescriptor<Runtime>,
3142
+ struct swift_ptrauth_struct_context_descriptor (OpaqueTypeDescriptor)
3143
+ TargetOpaqueTypeDescriptor final
3144
+ : TargetContextDescriptor<Runtime>,
3122
3145
TrailingGenericContextObjects<TargetOpaqueTypeDescriptor<Runtime>,
3123
3146
TargetGenericContextDescriptorHeader,
3124
3147
RelativeDirectPointer<const char >>
@@ -3694,8 +3717,8 @@ struct TargetCanonicalSpecializedMetadatasCachingOnceToken {
3694
3717
};
3695
3718
3696
3719
template <typename Runtime>
3697
- class TargetTypeContextDescriptor
3698
- : public TargetContextDescriptor<Runtime> {
3720
+ class swift_ptrauth_struct_context_descriptor (TypeContextDescriptor)
3721
+ TargetTypeContextDescriptor : public TargetContextDescriptor<Runtime> {
3699
3722
public:
3700
3723
// / The name of the type.
3701
3724
TargetRelativeDirectPointer<Runtime, const char , /* nullable*/ false > Name;
@@ -3917,7 +3940,8 @@ struct TargetObjCResilientClassStubInfo {
3917
3940
};
3918
3941
3919
3942
template <typename Runtime>
3920
- class TargetClassDescriptor final
3943
+ class swift_ptrauth_struct_context_descriptor (ClassDescriptor)
3944
+ TargetClassDescriptor final
3921
3945
: public TargetTypeContextDescriptor<Runtime>,
3922
3946
public TrailingGenericContextObjects<TargetClassDescriptor<Runtime>,
3923
3947
TargetTypeGenericContextDescriptorHeader,
@@ -4307,8 +4331,8 @@ class TargetClassDescriptor final
4307
4331
using ClassDescriptor = TargetClassDescriptor<InProcess>;
4308
4332
4309
4333
template <typename Runtime>
4310
- class TargetValueTypeDescriptor
4311
- : public TargetTypeContextDescriptor<Runtime> {
4334
+ class swift_ptrauth_struct_context_descriptor (ValueTypeDescriptor)
4335
+ TargetValueTypeDescriptor : public TargetTypeContextDescriptor<Runtime>{
4312
4336
public:
4313
4337
static bool classof (const TargetContextDescriptor<Runtime> *cd) {
4314
4338
return cd->getKind () == ContextDescriptorKind::Struct ||
@@ -4318,7 +4342,8 @@ class TargetValueTypeDescriptor
4318
4342
using ValueTypeDescriptor = TargetValueTypeDescriptor<InProcess>;
4319
4343
4320
4344
template <typename Runtime>
4321
- class TargetStructDescriptor final
4345
+ class swift_ptrauth_struct_context_descriptor (StructDescriptor)
4346
+ TargetStructDescriptor final
4322
4347
: public TargetValueTypeDescriptor<Runtime>,
4323
4348
public TrailingGenericContextObjects<TargetStructDescriptor<Runtime>,
4324
4349
TargetTypeGenericContextDescriptorHeader,
@@ -4445,7 +4470,8 @@ class TargetStructDescriptor final
4445
4470
using StructDescriptor = TargetStructDescriptor<InProcess>;
4446
4471
4447
4472
template <typename Runtime>
4448
- class TargetEnumDescriptor final
4473
+ class swift_ptrauth_struct_context_descriptor (EnumDescriptor)
4474
+ TargetEnumDescriptor final
4449
4475
: public TargetValueTypeDescriptor<Runtime>,
4450
4476
public TrailingGenericContextObjects<TargetEnumDescriptor<Runtime>,
4451
4477
TargetTypeGenericContextDescriptorHeader,
0 commit comments