Skip to content

Commit a218281

Browse files
committed
[SIL] Don't verify functions whose body was skipped
1 parent cf6a137 commit a218281

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
@@ -5450,6 +5450,16 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
54505450
CanSILFunctionType FTy = F->getLoweredFunctionType();
54515451
verifySILFunctionType(FTy);
54525452

5453+
// Don't verify functions that were skipped. We are likely to see them in
5454+
// FunctionBodySkipping::NonInlinableWithoutTypes mode.
5455+
auto Ctx = F->getDeclContext();
5456+
if (Ctx) {
5457+
if (auto AFD = dyn_cast<AbstractFunctionDecl>(Ctx)) {
5458+
if (AFD->isBodySkipped())
5459+
return;
5460+
}
5461+
}
5462+
54535463
if (F->isExternalDeclaration()) {
54545464
if (F->hasForeignBody())
54555465
return;

0 commit comments

Comments
 (0)