AST: Add ModuleDecl::isResilient()

This cleans up some code. I'm keeping the ResilienceStrategy enum around
though, in case we want to use it to version the ABI in the future.
This commit is contained in:
Slava Pestov
2019-03-13 22:55:40 -04:00
parent 1ad5b70133
commit a2049972ca
12 changed files with 28 additions and 64 deletions

View File

@@ -1455,7 +1455,7 @@ Status ModuleFile::associateWithFileContext(FileUnit *file,
return error(Status::TargetIncompatible);
}
if (ctx.LangOpts.EnableTargetOSChecking &&
M->getResilienceStrategy() != ResilienceStrategy::Resilient &&
!M->isResilient() &&
isTargetTooNew(moduleTarget, ctx.LangOpts.Target)) {
return error(Status::TargetTooNew);
}