When this test was updated for new platforms it was accidentally changed
to match the _METACLASS_DATA symbol instead of the _DATA symbol. Fix
that and update the flags to match. This lets us remove the instance
start value 40 from the checks, so the test now matches the comment
saying it should be 8 or 16.
rdar://135453916
This test has been failing on arm64-tvos-simulator forever, and after we
bumped the default deployment target is also failing on x86_64. Update
the test to match ios/watchos, which were already fixed in the past.
rdar://135453916
We used to crash for classes that have an empty and a resilient field
during intialization if the object was in the shared cache.
class CrashInInit {
var empty = EmptyStruct()
var resilient = ResilientThing()
}
What happened was that for such a class we we would compute a
instanceStart of 0. The shared cache builder would then slide the value
of the constant ivar offset for the empty field from 0 to 16. However,
the field offset for empty fields is assumed to be zero and the runtime
does not compute a different value for the empty field and so the field
offset for the empty field remains 0. The runtime then trys to reconcile
the field offset (0) and the ivar offset (16) trying to write to the ivar
offset. However, the ivar offset is marked as constant and so we
crashed.
This can be avoided by correctly computing the instanceStart for such a
class to be 16 such that the shared cache builder does not update the
value of the empty field.
rdar://rdar://58458169