Skip to content

Commit 8d257c2

Browse files
committed
[TBD] Validate TBDs in debug compilers for all platforms.
This is generalizing caa3dd4 to work even on non-Apple platforms. Fixes rdar://problem/40431434.
1 parent 0c4fe6c commit 8d257c2

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
@@ -1171,15 +1171,13 @@ static bool validateTBDIfNeeded(CompilerInvocation &Invocation,
11711171
switch (mode) {
11721172
case FrontendOptions::TBDValidationMode::Default:
11731173
#ifndef NDEBUG
1174-
// When a debug compiler is targeting an apple platform, we do some
1175-
// validation by default.
1176-
if (Invocation.getLangOptions().Target.getVendor() == llvm::Triple::Apple) {
1177-
mode = FrontendOptions::TBDValidationMode::MissingFromTBD;
1178-
break;
1179-
}
1180-
#endif
1174+
// With a debug compiler, we do some validation by default.
1175+
mode = FrontendOptions::TBDValidationMode::MissingFromTBD;
1176+
break;
1177+
#else
11811178
// Otherwise, the default is to do nothing.
11821179
LLVM_FALLTHROUGH;
1180+
#endif
11831181
case FrontendOptions::TBDValidationMode::None:
11841182
return false;
11851183
case FrontendOptions::TBDValidationMode::All:

0 commit comments

Comments
 (0)