[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:
Robert Widmann
2020-09-24 23:25:47 -06:00
parent 360afd6034
commit 76cd4bf160
5 changed files with 36 additions and 0 deletions

View File

@@ -50,11 +50,22 @@ DependencyTracker::addDependency(StringRef File, bool IsSystem) {
/*IsMissing=*/false);
}
void DependencyTracker::addIncrementalDependency(StringRef File) {
if (incrementalDepsUniquer.insert(File).second) {
incrementalDeps.emplace_back(File.str());
}
}
ArrayRef<std::string>
DependencyTracker::getDependencies() const {
return clangCollector->getDependencies();
}
ArrayRef<std::string>
DependencyTracker::getIncrementalDependencies() const {
return incrementalDeps;
}
std::shared_ptr<clang::DependencyCollector>
DependencyTracker::getClangCollector() {
return clangCollector;