[NFC] Refactor InputFile's Accessors

This commit is contained in:
Robert Widmann
2020-09-11 21:21:14 -06:00
parent 0a5a6f17c8
commit a8766cce5b
9 changed files with 69 additions and 38 deletions

View File

@@ -2414,7 +2414,7 @@ createDispatchingDiagnosticConsumerIfNeeded(
inputsAndOutputs.forEachInputProducingSupplementaryOutput(
[&](const InputFile &input) -> bool {
if (auto consumer = maybeCreateConsumerForDiagnosticsFrom(input))
subconsumers.emplace_back(input.file(), std::move(consumer));
subconsumers.emplace_back(input.getFileName(), std::move(consumer));
return false;
});
// For batch mode, the compiler must sometimes swallow diagnostics pertaining
@@ -2431,7 +2431,7 @@ createDispatchingDiagnosticConsumerIfNeeded(
if (!subconsumers.empty() && inputsAndOutputs.hasMultiplePrimaryInputs()) {
inputsAndOutputs.forEachNonPrimaryInput(
[&](const InputFile &input) -> bool {
subconsumers.emplace_back(input.file(), nullptr);
subconsumers.emplace_back(input.getFileName(), nullptr);
return false;
});
}