Remove Ranges File Type

This commit is contained in:
Robert Widmann
2021-01-13 22:30:34 -08:00
parent d427d38bd2
commit 2475095021
22 changed files with 8 additions and 716 deletions

View File

@@ -654,24 +654,7 @@ static void emitSwiftdepsForAllPrimaryInputsIfNeeded(
emitReferenceDependencies(Instance, SF, referenceDependenciesFilePath);
}
}
static void
emitSwiftRangesForAllPrimaryInputsIfNeeded(CompilerInstance &Instance) {
const auto &Invocation = Instance.getInvocation();
if (Invocation.getFrontendOptions().InputsAndOutputs.hasSwiftRangesPath() &&
Instance.getPrimarySourceFiles().empty()) {
Instance.getDiags().diagnose(SourceLoc(),
diag::emit_swift_ranges_without_primary_file);
return;
}
for (auto *SF : Instance.getPrimarySourceFiles()) {
const std::string &swiftRangesFilePath =
Invocation.getSwiftRangesFilePathForPrimary(SF->getFilename());
if (!swiftRangesFilePath.empty()) {
(void)Instance.emitSwiftRanges(Instance.getDiags(), SF,
swiftRangesFilePath);
}
}
}
static void emitCompiledSourceForAllPrimaryInputsIfNeeded(
CompilerInstance &Instance) {
const auto &Invocation = Instance.getInvocation();
@@ -1059,7 +1042,6 @@ static void performEndOfPipelineActions(CompilerInstance &Instance) {
Instance.getDependencyTracker(), opts);
// Emit information about the parsed primaries.
emitSwiftRangesForAllPrimaryInputsIfNeeded(Instance);
emitCompiledSourceForAllPrimaryInputsIfNeeded(Instance);
}