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:
Robert Widmann
2019-12-02 10:44:49 -08:00
committed by GitHub

View File

@@ -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: