Artem Chikin
6176657285
[Dependency Scanning] Include initial PCM arguments on Clang module dependency details
...
Doing so will allow clients to know which Swift-specific PCM arguments are already captured from the scan that first discovered this module.
SwiftDriver, in particular, will be able to use this information to avoid re-scanning a given Clang module if the initial scan was sufficient for all possible sets of PCM arguments on Swift modules that depend on said Clang module.
2021-09-22 11:34:02 -07:00
Artem Chikin
e64a40451b
[Dependency Scanning] Model main module as separate dependency kind: SwiftSource
...
These kinds of modules differ from `SwiftTextual` modules in that they do not have an interface and have source-files.
It is cleaner to enforce this distinction with types, instead of checking for interface optionality everywhere.
2021-09-15 09:31:20 -07:00
Artem Chikin
d621e22ffe
[Dependency Scanning] Use DEFINE_SIMPLE_CONVERSION_FUNCTIONS macro instead of defining own wrap/unwrap functions for the opaque scanner type.
2021-01-07 09:08:21 -08:00
Artem Chikin
41a09a4092
[Dependency Scanning] Establish object ownership convention by using a Foundation-style ownership signals naming scheme across the API surface.
...
Foundation-style ownership signals documentation:
https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-CJBEJBHH
2021-01-07 09:08:21 -08:00
Artem Chikin
f91c8a8574
[Dependency Scanning] Refactor string implementation to always malloc and tie lifetime to owning object.
2021-01-07 09:08:21 -08:00
Artem Chikin
53e53db6c0
[Dependency Scanning] Factor the shared library libSwiftScan into tools and add exports file.
...
This library now relires on a static compiler library called `swiftDependencyScan`, which is also common to being used by `swift-frontend` for its dependency scanner invocations.
2021-01-07 09:08:20 -08:00
Artem Chikin
ca1694442d
[Dependency Scanning] Export opaque types as pointers to C structs instead of void* for better type-safety and cleaner code
2021-01-07 09:08:20 -08:00
Artem Chikin
108e9da448
[Dependency Scanning] Make scanner invocation context (argc, argv, working_dir) an opaque type
2021-01-07 09:08:20 -08:00
Artem Chikin
cff741b60f
[Dependency Scanning] Make the prescan dependency scan result (import set) an opaque structure
2021-01-07 09:08:20 -08:00
Artem Chikin
c6705ad090
[Dependency Scanning] Make the batch scan entry container an opaque type
2021-01-07 09:08:20 -08:00
Artem Chikin
409de733f7
[Dependency Scanning] Make the overall dependency scan result (inter-module dependency graph) an opaque structure
2021-01-07 09:08:20 -08:00
Artem Chikin
5cacff4d84
[Dependency Scanning] Make a module's dependency info an opaque structure
2021-01-07 09:08:20 -08:00
Artem Chikin
fcf943370e
[Dependency Scanning] Change C API prefix to: swiftscan from ds and adopt query method naming scheme of:
...
`<prefix>_<object>_<action>`
2021-01-07 09:08:20 -08:00
Artem Chikin
2ad960083a
[Dependency Scanning] Use an opaque type for dependency module details with API query functions for individual fields
2021-01-07 09:08:20 -08:00