Commit Graph

18 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
c3fefc0280 TBD: Be sure to visit enum element default arguments
Enum element default arguments is a recent addition to the language.
With -enable-testing, default arguments can have public linkage.

Fixes <rdar://problem/53948283>.
2019-08-05 15:35:18 -04:00
Harlan Haskins
75e219543e [TBDGen] Enable TBD generation after -typecheck 2018-08-15 15:33:26 -07:00
Harlan
1b57edfc68 [TBDGen] Skip @_silgen_name functions with no body (#18613)
`@_silgen_name` functions with no body are forward-declarations of
existing symbols, only to appease the typechecker. They don't show up in
the IR, so don't add them to the TBD file.
2018-08-10 10:38:55 -07:00
Slava Pestov
31ab93b82c Remove Swift 3-specific tests 2018-07-02 21:14:22 -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
a4da508b48 [test] Test TBD generation with optimizations on. 2018-06-29 11:03:42 +10:00
Huon Wilson
1399aeb2de [TBDGen] Consider -enable-testing for default arg generator symbols.
Fixes rdar://problem/40736382.
2018-06-01 15:18:24 -07:00
Huon Wilson
bf8288002d [TBDGen] @_cdecl still exists, and adds symbols.
Fixes rdar://problem/40405377.
2018-05-21 22:45:30 +10:00
Slava Pestov
f2b2cd4019 TBD: Test default argument behavior in Swift 3 and 4 mode
Also, bail out before emitting any default argument generators in Swift 4
mode. This is NFC, because we already check the linkage of the SILDeclRef
and skip it if its not public. But adding the check explicitly here
serves as a reminder that this entire code block can be deleted if we
ever decide to kill off Swift 3 compatibility.
2018-01-14 22:59:41 -08:00
Slava Pestov
5511146b21 TBD: Add test for default argument generators 2018-01-12 19:03:49 -08: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
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