@@ -200,8 +200,8 @@ namespace {
200
200
bool ClassHasGenericLayout = false ;
201
201
202
202
// Is this class or any of its superclasses resilient from the viewpoint
203
- // of the current module? This means that their metadata can change size
204
- // and field offsets, generic arguments and virtual methods must be
203
+ // of the current module? This means that their metadata can change size,
204
+ // hence field offsets, generic arguments and virtual methods must be
205
205
// accessed relative to a metadata base global variable.
206
206
bool ClassHasResilientAncestry = false ;
207
207
@@ -261,14 +261,11 @@ namespace {
261
261
return Elements;
262
262
}
263
263
264
- // / Does the class metadata have a completely known, static layout that
265
- // / does not require initialization at runtime beyond registeration of
266
- // / the class with the Objective-C runtime?
264
+ // / Do instances of the class have a completely known, static layout?
267
265
bool isFixedSize () const {
268
266
return !(ClassHasMissingMembers ||
269
267
ClassHasResilientMembers ||
270
268
ClassHasGenericLayout ||
271
- ClassHasResilientAncestry ||
272
269
ClassHasObjCAncestry);
273
270
}
274
271
@@ -336,6 +333,7 @@ namespace {
336
333
// If the class is resilient, don't walk over its fields; we have to
337
334
// calculate the layout at runtime.
338
335
ClassHasResilientAncestry = true ;
336
+ ClassHasResilientMembers = true ;
339
337
340
338
// Furthermore, if the superclass is generic, we have to assume
341
339
// that its layout depends on its generic parameters. But this only
@@ -358,6 +356,7 @@ namespace {
358
356
359
357
if (IGM.isResilient (theClass, ResilienceExpansion::Maximal)) {
360
358
ClassHasResilientAncestry = true ;
359
+ ClassHasResilientMembers = true ;
361
360
return ;
362
361
}
363
362
0 commit comments