mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[NFC] Differential Incremental External Dependencies in DependencyTracker
Also perform the plumbing necessary to convince the rest of the compiler that they're just ordinary external dependencies. In particular, we will still emit these depenencies into .d files, and code completion will still index them.
This commit is contained in:
@@ -209,6 +209,12 @@ static bool emitMakeDependenciesIfNeeded(DiagnosticEngine &diags,
|
||||
dependencyString.push_back(' ');
|
||||
dependencyString.append(frontend::utils::escapeForMake(path, buffer).str());
|
||||
}
|
||||
auto incrementalDependencyPaths =
|
||||
reversePathSortedFilenames(depTracker->getIncrementalDependencies());
|
||||
for (auto const &path : incrementalDependencyPaths) {
|
||||
dependencyString.push_back(' ');
|
||||
dependencyString.append(frontend::utils::escapeForMake(path, buffer).str());
|
||||
}
|
||||
|
||||
// FIXME: Xcode can't currently handle multiple targets in a single
|
||||
// dependency line.
|
||||
@@ -1176,6 +1182,7 @@ static void countASTStats(UnifiedStatsReporter &Stats,
|
||||
|
||||
if (auto *D = Instance.getDependencyTracker()) {
|
||||
C.NumDependencies = D->getDependencies().size();
|
||||
C.NumIncrementalDependencies = D->getIncrementalDependencies().size();
|
||||
}
|
||||
|
||||
for (auto SF : Instance.getPrimarySourceFiles()) {
|
||||
|
||||
Reference in New Issue
Block a user