mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/master' into master-next
This commit is contained in:
@@ -1167,9 +1167,20 @@ static bool validateTBDIfNeeded(CompilerInvocation &Invocation,
|
||||
return false;
|
||||
|
||||
const auto &frontendOpts = Invocation.getFrontendOptions();
|
||||
const auto mode = frontendOpts.ValidateTBDAgainstIR;
|
||||
auto mode = frontendOpts.ValidateTBDAgainstIR;
|
||||
// Ensure all cases are covered by using a switch here.
|
||||
switch (mode) {
|
||||
case FrontendOptions::TBDValidationMode::Default:
|
||||
#ifndef NDEBUG
|
||||
// When a debug compiler is targeting an apple platform, we do some
|
||||
// validation by default.
|
||||
if (Invocation.getLangOptions().Target.getVendor() == llvm::Triple::Apple) {
|
||||
mode = FrontendOptions::TBDValidationMode::MissingFromTBD;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
// Otherwise, the default is to do nothing.
|
||||
LLVM_FALLTHROUGH;
|
||||
case FrontendOptions::TBDValidationMode::None:
|
||||
return false;
|
||||
case FrontendOptions::TBDValidationMode::All:
|
||||
|
||||
Reference in New Issue
Block a user