Commit Graph

9 Commits

Author SHA1 Message Date
Cyndy Ishida
98fa58408f [swift][TBDGen] Stop adding redundant ObjC Classes (#62068)
TBD files contain a section reserved for obj-c classes. Previously,
TBDGen was adding symbols with this + normal globals with objc class
prefixes. This patch removes the extra globals being added.

This also accounts for this behavior for `validate-tbd-against-ir`
checking.

Resolves: rdar://101442087
2022-11-11 20:36:31 -08:00
Xi Ge
94fead45df swift-api-extract: extract decls with @_spi_available attributes as SPI
Working similarly as SPI_AVAILABLE in Clang, Swift decls marked with @_spi_available should be considered private
2022-10-15 08:46:20 -07:00
Juergen Ributzka
a9e02e91cb [TBDGen] Add support for Objective-C Categories.
Emit Objective-C Categories for extensions that have the @objc attribute
directly (or indirectly via one of its methods, subscripts, etc) attached.

Also associate and emit all methods for that category into the API JSON file.

This fixes rdar://94734748.
2022-06-28 09:09:49 -07:00
Steven Wu
db97c0d187 [APIJSON] Impromve tests to it doesn't rely on SDK content
Remove the dependency of APIJSON tests on SDK to improve stability and
speed.

rdar://89448415
2022-03-03 13:47:11 -08:00
Steven Wu
5dae683933 [swift-api-extract] Handle @_spi interfaces with correct APIAccess
rdar://83506338
2021-09-24 12:40:52 -07:00
Steven Wu
8818844451 Fix PR36520 for Apple Scilicon Mac
Do not hard code target in the check since it is different on Apple
Scilicon Mac.
2021-03-22 08:18:41 -07:00
Steven Wu
9904f9bb9c [SR-14311] Error out when swift-api-extract failed to load module
Emit diagnostics and error out when swift-api-extract failed to load
module.
2021-03-19 10:55:59 -07:00
Alexis Laferrière
a18c2a18f9 [Test] Add -module-cache-path flag to the APIJSON tests
The APIJSON tests used the default module cache and generated different
modules under the same name. This lead some tests to load a different
module than intended. This was made more easily detectable with the lock
on the swiftmodules instead of the swiftinterfaces.
2021-03-02 12:38:15 -08:00
Steven Wu
02c41656be swift-api-extract to generate JSON API information
Add a new swift-frontend driver option that extract APIs in the swift
module and print in JSON format. This is to allow tooling to understand
and process swift APIs without the need to be a swift compiler or
understand swift module/AST.
2021-02-15 15:04:52 -08:00