Merge remote-tracking branch 'origin/main' into rebranch

This commit is contained in:
swift-ci
2021-01-08 16:12:47 -08:00
34 changed files with 3185 additions and 1077 deletions

View File

@@ -321,22 +321,11 @@ void CompilerInstance::setupDependencyTrackerIfNeeded() {
DepTracker = std::make_unique<DependencyTracker>(*collectionMode);
}
void CompilerInstance::setUpModuleDependencyCacheIfNeeded() {
const auto &Invocation = getInvocation();
const auto &opts = Invocation.getFrontendOptions();
if (opts.RequestedAction == FrontendOptions::ActionType::ScanDependencies ||
opts.RequestedAction == FrontendOptions::ActionType::ScanClangDependencies) {
ModDepCache = std::make_unique<ModuleDependenciesCache>();
}
}
bool CompilerInstance::setup(const CompilerInvocation &Invok) {
Invocation = Invok;
setupDependencyTrackerIfNeeded();
setUpModuleDependencyCacheIfNeeded();
// If initializing the overlay file system fails there's no sense in
// continuing because the compiler will read the wrong files.
if (setUpVirtualFileSystemOverlays())