mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #17581 from huonw/validate-tbd-by-default-everywhere
[Don't merge] [TBD] Validate TBDs in debug compilers for all platforms.
This commit is contained in:
@@ -1401,15 +1401,13 @@ static bool validateTBDIfNeeded(CompilerInvocation &Invocation,
|
||||
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
|
||||
// With a debug compiler, we do some validation by default.
|
||||
mode = FrontendOptions::TBDValidationMode::MissingFromTBD;
|
||||
break;
|
||||
#else
|
||||
// Otherwise, the default is to do nothing.
|
||||
LLVM_FALLTHROUGH;
|
||||
#endif
|
||||
case FrontendOptions::TBDValidationMode::None:
|
||||
return false;
|
||||
case FrontendOptions::TBDValidationMode::All:
|
||||
|
||||
Reference in New Issue
Block a user