Commit Graph

5 Commits

Author SHA1 Message Date
Arnold Schwaighofer
20ff4dfc57 IRGen: Don't treat internal but visible via testable import classes as having fragile layout
That does not work if there is a resilient class in the hiearchy from a
different module than the testable imported one.  Rather treat an
internal but testable imported class as having resilient metadata.

The scenario that does not work assuming we can build a fragile layout
is the following.

FrameworkA is resilient and defines a public class `Base` with a stored field.
FrameworkB is resilient and defines an internal class `Sub` that inherits from
the class `Base` in FrameworkA and adds some fields. FrameworkB is compiled
with enable-testing.
The test case testable imports FrameworkB and accesses a field in the
internal class `Base` from FrameworkB. The test case only has access to
FrameworkA's public swiftinterface file and therefore does not know
`Base`'s layout.  The layout computation for `Sub` cannot take the field
from `Base` into account and things fail silently.

rdar://103323275
2022-12-19 07:35:56 -08:00
Duo Wang
72e0ac2819 [tests] fix missing codesign in test files 2022-07-28 13:59:44 -07:00
Nate Chandler
aff8299523 [Test] Added REQUIRES line to two.
rdar://91132726
rdar://91133163
2022-03-31 16:42:30 -07:00
Arnold Schwaighofer
3930fc4cfe IRGen: Fix enable-testing of internal with resilient super class
Enable testing makes `internal` types visible from outside the module.
We can no longer treat super classes as resilient.

Follow-up to #41044.

rdar://90489618
2022-03-30 07:12:14 -07:00
Arnold Schwaighofer
d48422f6f9 IRGen: Take enable-testing into account when computing whether a class has resilient metadata
rdar://87617621
2022-01-27 14:08:05 -08:00