Skip to content

Commit b935c4a

Browse files
authored
Merge pull request swiftlang#34948 from xymus/skip-sil-verify-skipped-functions
[SIL] Don't verify functions that were skipped
2 parents a6b302c + a218281 commit b935c4a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5467,6 +5467,16 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
54675467
CanSILFunctionType FTy = F->getLoweredFunctionType();
54685468
verifySILFunctionType(FTy);
54695469

5470+
// Don't verify functions that were skipped. We are likely to see them in
5471+
// FunctionBodySkipping::NonInlinableWithoutTypes mode.
5472+
auto Ctx = F->getDeclContext();
5473+
if (Ctx) {
5474+
if (auto AFD = dyn_cast<AbstractFunctionDecl>(Ctx)) {
5475+
if (AFD->isBodySkipped())
5476+
return;
5477+
}
5478+
}
5479+
54705480
if (F->isExternalDeclaration()) {
54715481
if (F->hasForeignBody())
54725482
return;

0 commit comments

Comments
 (0)