mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Dependency Scanner] Refactor the global scanning service to no longer maintain scanner cache state
Instead, each scan's 'ModuleDependenciesCache' will hold all of the data corresponding to discovered module dependencies. The initial design presumed the possibility of sharing a global scanning cache amongs different scanner invocations, possibly even different concurrent scanner invocations. This change also deprecates two libSwiftScan entry-points: 'swiftscan_scanner_cache_load' and 'swiftscan_scanner_cache_serialize'. They never ended up getting used, and since this code has been largely stale, we are confident they have not otherwise had users, and they do not fit with this design. A follow-up change will re-introduce moduele dependency cache serialization on a per-query basis and bring the binary format up-to-date.
This commit is contained in:
@@ -145,18 +145,6 @@ void swiftscan_dependency_set_dispose(swiftscan_dependency_set_t *set) {
|
||||
|
||||
//=== Scanner Cache Operations --------------------------------------------===//
|
||||
|
||||
void swiftscan_scanner_cache_serialize(swiftscan_scanner_t scanner,
|
||||
const char * path) {
|
||||
DependencyScanningTool *ScanningTool = unwrap(scanner);
|
||||
ScanningTool->serializeCache(path);
|
||||
}
|
||||
|
||||
bool swiftscan_scanner_cache_load(swiftscan_scanner_t scanner,
|
||||
const char * path) {
|
||||
DependencyScanningTool *ScanningTool = unwrap(scanner);
|
||||
return ScanningTool->loadCache(path);
|
||||
}
|
||||
|
||||
void swiftscan_scanner_cache_reset(swiftscan_scanner_t scanner) {
|
||||
DependencyScanningTool *ScanningTool = unwrap(scanner);
|
||||
ScanningTool->resetCache();
|
||||
|
||||
Reference in New Issue
Block a user