Commit Graph

23 Commits

Author SHA1 Message Date
Cyndy Ishida
f869bd7e8a [TBDGen] Write tbd-v5 files by default
* Fixup tests to handle new json based output.
* Use llvm-nm & readtapi to verify tbd file outputs.

resolves: rdar://117604275
2023-11-14 08:06:24 -08:00
Allan Shortlidge
d0028e098e Test: Improve test coverage for TBDGen. 2022-10-19 12:35:30 -07:00
Cyndy Ishida
e6b3fd4bcd [TBDGen] disable tests on linux 2019-09-25 13:11:14 -07:00
Slava Pestov
1159af50d9 Rename -enable-resilience to -enable-library-evolution and make it a driver flag
Fixes <rdar://problem/47679085>.
2019-03-14 22:24:26 -04:00
Harlan Haskins
75e219543e [TBDGen] Enable TBD generation after -typecheck 2018-08-15 15:33:26 -07:00
Huon Wilson
6a9a381ff8 [test] Redirect huge IR dumps to /dev/null in TBD tests.
Actually looking at the dumped IR is usually not interesting, the tests just
need to get to that stage to be able to perform the validation
correctly. Additionally, the IR is very large for some of these tests, so
dumping it makes things sllooooowww when something fails.
2018-06-29 11:04:28 +10:00
Huon Wilson
98bc2d278a [SIL] Default arg generators shouldn't be connected to their class.
These are never public (at least, in Swift > 4), and so shouldn't be connected
to their superclass.

Fixes rdar://problem/41563759.
2018-06-28 15:57:53 +10:00
Huon Wilson
d59d833638 [test] Test -enable-testing configurations with all TBDGen tests. 2018-06-01 15:20:41 -07:00
Slava Pestov
22ad20a5df TBDGen: Emit class method dispatch thunks 2017-12-18 23:28:33 -08:00
Huon Wilson
fed23ed40d [TBDGen] Include both direct and indirect field offsets.
It is semantically incorrect to miss a symbol, and just misleading to
include an incorrect one in the TBD file (and, it would take a compiler
bug to actually try to reference one from some downstream code), so it
is better to err on the side of including extra symbols than missing
some.

For now, computing the actual directness of a field is difficult, so
let's include both of them.

Fixes rdar://problem/32253411 .
2017-06-19 14:53:21 -07:00
Huon Wilson
40ba18615b [Frontend] -validate-tbd-against-ir has 3 levels of validation.
It can now:

- not validate (=none)
- validate that all symbols in the IR are also in the TBD (=missing),
- validate the above, and also that all in the TBD are in the IR (=all).

The first and last were switched between with the old boolean flag, the
second is new.
2017-05-19 18:36:48 -07:00
Huon Wilson
6b9260582b [test/TBD] Avoid writing to source directory. 2017-04-18 11:33:54 -07:00
Huon Wilson
7bedb6fdd5 [TBDGen] Generic types have fewer symbols. 2017-04-14 17:06:53 -07:00
Huon Wilson
e5acdd42fc [TBDGen] Handle private/internal methods on open classes. 2017-04-14 10:13:11 -07:00
Huon Wilson
c41319b24b [SIL] Only open classes can be subclassed externally. 2017-04-14 10:13:11 -07:00
Huon Wilson
6cccddf39a [TBDGen] Class metaclasses, when interacting with ObjC. 2017-04-13 11:40:50 -07:00
Huon Wilson
53807e4641 [test/TBD] Only test classes with objc_interop.
The list of missing symbols is different on linux, without objc support,
meaning the diff-based testing fails. This is only a problem when we
have do this diffing, so just conditionalise it for now.
2017-03-29 09:44:38 -07:00
Huon Wilson
91bf6771ca [test/TBD] add tests that really use private-access. 2017-03-28 16:31:12 -07:00
Huon Wilson
d7a8b8382f [test/TBD] use "internal" instead of "private". 2017-03-28 16:31:11 -07:00
Huon Wilson
636a3c5821 [TBD] Sort -emit-tbd, and -validate-tbd-against-ir errors.
Also, diff the full output rather than using FileCheck.
2017-03-28 16:31:10 -07:00
Huon Wilson
dab44b3cc6 [TBDGen] Private class decls have public type information. 2017-03-28 16:31:10 -07:00
Huon Wilson
121067a8ce [TBDGen] let: accessors and variable itself. 2017-03-28 16:31:10 -07:00
Huon Wilson
6f822ac3e3 [test] Add TBD tests using -validate-tbd-against-ir.
Only one of these tests actually "passes", since TBDGen is incomplete,
but the use of FileCheck means they'll be flagged to be updated as
TBDGen improves: the failures are known problems.
2017-03-28 16:31:09 -07:00