Commit Graph

21 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
e952579122 [test] Add a test that combines all TBD files into a single module.
This checks that all combinations of optimized & non-optimized, and whole-module
optimization & incremental compilation give the same result, on a module where
this is actually interesting (i.e. has multiple files so the behaviour differs
between the two).
2018-08-07 09:54:35 +10:00
Huon Wilson
e57b332a82 [TBDGen] Look for @_hasInitialValue on variables rather than an initializer expression.
The initializer expression is lost in the public interface (in Swift modules and
the textual interface), but the attribute is preserved.
2018-08-07 09:54:35 +10: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
a4da508b48 [test] Test TBD generation with optimizations on. 2018-06-29 11:03:42 +10:00
Huon Wilson
d59d833638 [test] Test -enable-testing configurations with all TBDGen tests. 2018-06-01 15:20:41 -07:00
Huon Wilson
33db2af99f [TBDGen] Walk accessors as part of their parent storage, not the main AST.
Sometimes, inconsistently, an accessor appears as a member of a parent
DeclContext, but other times it can seemingly only be accessed through the
storage decl. Instead of trying to conditionalise on this, just use the storage
decl as the canonical source, and ignore direct visits to accessors (i.e. the
membership route to ones that are members of other things).

Fixes rdar://problem/40476839.
2018-05-23 22:29:14 +10:00
Huon Wilson
a560ea15f1 [TBDGen] Include all transparent symbols.
This is a vast overestimate, but is better than missing some.

rdar://problem/32254773
2017-06-30 11:17:51 -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
2446db55ed [TBDGen] Stored property initializers. 2017-04-13 11:38:58 -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
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