mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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) {
|
switch (mode) {
|
||||||
case FrontendOptions::TBDValidationMode::Default:
|
case FrontendOptions::TBDValidationMode::Default:
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
// When a debug compiler is targeting an apple platform, we do some
|
// With a debug compiler, we do some validation by default.
|
||||||
// validation by default.
|
mode = FrontendOptions::TBDValidationMode::MissingFromTBD;
|
||||||
if (Invocation.getLangOptions().Target.getVendor() == llvm::Triple::Apple) {
|
break;
|
||||||
mode = FrontendOptions::TBDValidationMode::MissingFromTBD;
|
#else
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
// Otherwise, the default is to do nothing.
|
// Otherwise, the default is to do nothing.
|
||||||
LLVM_FALLTHROUGH;
|
LLVM_FALLTHROUGH;
|
||||||
|
#endif
|
||||||
case FrontendOptions::TBDValidationMode::None:
|
case FrontendOptions::TBDValidationMode::None:
|
||||||
return false;
|
return false;
|
||||||
case FrontendOptions::TBDValidationMode::All:
|
case FrontendOptions::TBDValidationMode::All:
|
||||||
|
|||||||
Reference in New Issue
Block a user