mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
optional pointer to consumer replaces NullDiagnosticConsumer placeholder
This commit is contained in:
@@ -97,6 +97,13 @@ bool FrontendInputsAndOutputs::forEachPrimaryInput(
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FrontendInputsAndOutputs::forEachNonPrimaryInput(
|
||||
llvm::function_ref<bool(const InputFile &)> fn) const {
|
||||
return forEachInput([&](const InputFile &f) -> bool {
|
||||
return f.isPrimary() ? false : fn(f);
|
||||
});
|
||||
}
|
||||
|
||||
void FrontendInputsAndOutputs::assertMustNotBeMoreThanOnePrimaryInput() const {
|
||||
assert(!hasMultiplePrimaryInputs() &&
|
||||
"have not implemented >1 primary input yet");
|
||||
@@ -364,6 +371,11 @@ bool FrontendInputsAndOutputs::forEachInputProducingSupplementaryOutput(
|
||||
: hasInputs() ? fn(firstInput()) : false;
|
||||
}
|
||||
|
||||
bool FrontendInputsAndOutputs::forEachInputNotProducingSupplementaryOutput(
|
||||
llvm::function_ref<bool(const InputFile &)> fn) const {
|
||||
return hasPrimaryInputs() ? forEachNonPrimaryInput(fn) : false;
|
||||
}
|
||||
|
||||
bool FrontendInputsAndOutputs::hasSupplementaryOutputPath(
|
||||
llvm::function_ref<const std::string &(const SupplementaryOutputPaths &)>
|
||||
extractorFn) const {
|
||||
|
||||
Reference in New Issue
Block a user