Skip to content

Commit 16bd20e

Browse files
authored
Merge pull request swiftlang#17581 from huonw/validate-tbd-by-default-everywhere
[Don't merge] [TBD] Validate TBDs in debug compilers for all platforms.
2 parents 266f2c8 + 8d257c2 commit 16bd20e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,15 +1401,13 @@ static bool validateTBDIfNeeded(CompilerInvocation &Invocation,
14011401
switch (mode) {
14021402
case FrontendOptions::TBDValidationMode::Default:
14031403
#ifndef NDEBUG
1404-
// When a debug compiler is targeting an apple platform, we do some
1405-
// validation by default.
1406-
if (Invocation.getLangOptions().Target.getVendor() == llvm::Triple::Apple) {
1407-
mode = FrontendOptions::TBDValidationMode::MissingFromTBD;
1408-
break;
1409-
}
1410-
#endif
1404+
// With a debug compiler, we do some validation by default.
1405+
mode = FrontendOptions::TBDValidationMode::MissingFromTBD;
1406+
break;
1407+
#else
14111408
// Otherwise, the default is to do nothing.
14121409
LLVM_FALLTHROUGH;
1410+
#endif
14131411
case FrontendOptions::TBDValidationMode::None:
14141412
return false;
14151413
case FrontendOptions::TBDValidationMode::All:

0 commit comments

Comments
 (0)