[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:
Artem Chikin
2021-05-25 15:00:04 -07:00
parent 23fcb4944b
commit 7e2c8e97fc
12 changed files with 360 additions and 22 deletions

View File

@@ -472,7 +472,7 @@ bool swift::dependencies::module_dependency_cache_serialization::
"loading inter-module dependency graph", path);
auto buffer = llvm::MemoryBuffer::getFile(path);
if (!buffer)
return false;
return true;
return readInterModuleDependenciesCache(*buffer.get(), cache);
}