[Dependency Scanning] Add import statement source locations to the dependency scanner cache serialization format

This commit is contained in:
Artem Chikin
2024-12-05 10:41:30 -08:00
parent 8399267785
commit 25d32fc7a3
5 changed files with 577 additions and 307 deletions

View File

@@ -355,7 +355,7 @@ ModuleDependencyScanner::getMainModuleDependencyInfo(ModuleDecl *mainModule) {
});
auto mainDependencies = ModuleDependencyInfo::forSwiftSourceModule(
{}, buildCommands, {}, ExtraPCMArgs);
{}, buildCommands, {}, {}, {}, ExtraPCMArgs);
if (ScanASTContext.CASOpts.EnableCaching) {
std::vector<std::string> clangDependencyFiles;
@@ -1166,7 +1166,7 @@ void ModuleDependencyScanner::discoverCrossImportOverlayDependencies(
auto actualMainID = ModuleDependencyID{mainModuleName.str(),
ModuleDependencyKind::SwiftSource};
auto dummyMainDependencies =
ModuleDependencyInfo::forSwiftSourceModule({}, {}, {}, {});
ModuleDependencyInfo::forSwiftSourceModule({}, {}, {}, {}, {}, {});
std::for_each(newOverlays.begin(), newOverlays.end(),
[&](Identifier modName) {
dummyMainDependencies.addModuleImport(modName.str());