@@ -1059,8 +1059,9 @@ struct TargetClassMetadata : public TargetAnyClassMetadata<Runtime> {
1059
1059
ConstTargetMetadataPointer<Runtime, TargetClassDescriptor> Description;
1060
1060
1061
1061
public:
1062
- // / A function for destroying instance variables, used to clean up
1063
- // / after an early return from a constructor.
1062
+ // / A function for destroying instance variables, used to clean up after an
1063
+ // / early return from a constructor. If null, no clean up will be performed
1064
+ // / and all ivars must be trivial.
1064
1065
TargetPointer<Runtime, ClassIVarDestroyer> IVarDestroyer;
1065
1066
1066
1067
// After this come the class members, laid out as follows:
@@ -3110,7 +3111,8 @@ struct TargetGenericClassMetadataPattern final :
3110
3111
TargetRelativeDirectPointer<Runtime, HeapObjectDestroyer> Destroy;
3111
3112
3112
3113
// / The ivar-destructor function.
3113
- TargetRelativeDirectPointer<Runtime, ClassIVarDestroyer> IVarDestroyer;
3114
+ TargetRelativeDirectPointer<Runtime, ClassIVarDestroyer, /* nullable*/ true >
3115
+ IVarDestroyer;
3114
3116
3115
3117
// / The class flags.
3116
3118
ClassFlags Flags;
@@ -3353,7 +3355,8 @@ struct TargetResilientClassMetadataPattern {
3353
3355
TargetRelativeDirectPointer<Runtime, HeapObjectDestroyer> Destroy;
3354
3356
3355
3357
// / The ivar-destructor function.
3356
- TargetRelativeDirectPointer<Runtime, ClassIVarDestroyer> IVarDestroyer;
3358
+ TargetRelativeDirectPointer<Runtime, ClassIVarDestroyer, /* nullable*/ true >
3359
+ IVarDestroyer;
3357
3360
3358
3361
// / The class flags.
3359
3362
ClassFlags Flags;
0 commit comments