[Dependency Scanning] Add a binary serialization format for the Inter-Module Dependencies Cache

- Adds serialization format based on the LLVM Bitcode File Format (https://llvm.org/docs/BitCodeFormat.html).
- Adds Serialization and Deserialization code.
This commit is contained in:
Artem Chikin
2021-05-21 10:46:19 -07:00
parent 8978efb4b2
commit 14229f13b0
18 changed files with 1264 additions and 16 deletions

View File

@@ -118,6 +118,11 @@ void ModuleDependencies::addBridgingSourceFile(StringRef bridgingSourceFile) {
swiftStorage->bridgingSourceFiles.push_back(bridgingSourceFile.str());
}
void ModuleDependencies::addSourceFile(StringRef sourceFile) {
auto swiftStorage = cast<SwiftTextualModuleDependenciesStorage>(storage.get());
swiftStorage->sourceFiles.push_back(sourceFile.str());
}
/// Add (Clang) module on which the bridging header depends.
void ModuleDependencies::addBridgingModuleDependency(
StringRef module, llvm::StringSet<> &alreadyAddedModules) {