mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Dependency Scanning] Add ability for -scan-dependencies action to serialize and deserialize dependency scanner cache from a .moddepcache file.
Using the serialization format added in https://github.com/apple/swift/pull/37585. - Add load/save code for the `-scan-dependencies` code-path. - Add `libSwiftDriver` entry-points to load/store the cache of a given scanner instance.
This commit is contained in:
@@ -57,6 +57,14 @@ public:
|
||||
const std::vector<BatchScanInput> &BatchInput,
|
||||
const llvm::StringSet<> &PlaceholderModules);
|
||||
|
||||
/// Writes the current `SharedCache` instance to a specified FileSystem path.
|
||||
void serializeCache(llvm::StringRef path);
|
||||
/// Loads an instance of a `ModuleDependenciesCache` to serve as the `SharedCache`
|
||||
/// from a specified FileSystem path.
|
||||
bool loadCache(llvm::StringRef path);
|
||||
/// Discard the tool's current `SharedCache` and start anew.
|
||||
void resetCache();
|
||||
|
||||
private:
|
||||
/// Using the specified invocation command, instantiate a CompilerInstance
|
||||
/// that will be used for this scan.
|
||||
|
||||
Reference in New Issue
Block a user