Merge pull request #34948 from xymus/skip-sil-verify-skipped-functions

[SIL] Don't verify functions that were skipped
This commit is contained in:
Alexis Laferrière
2020-12-04 11:13:19 -08:00
committed by GitHub

View File

@@ -5467,6 +5467,16 @@ public:
CanSILFunctionType FTy = F->getLoweredFunctionType();
verifySILFunctionType(FTy);
// Don't verify functions that were skipped. We are likely to see them in
// FunctionBodySkipping::NonInlinableWithoutTypes mode.
auto Ctx = F->getDeclContext();
if (Ctx) {
if (auto AFD = dyn_cast<AbstractFunctionDecl>(Ctx)) {
if (AFD->isBodySkipped())
return;
}
}
if (F->isExternalDeclaration()) {
if (F->hasForeignBody())
return;