mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #34948 from xymus/skip-sil-verify-skipped-functions
[SIL] Don't verify functions that were skipped
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user