@@ -969,10 +969,11 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
969
969
return numInsts;
970
970
}
971
971
972
- SILVerifier (const SILFunction &F, bool SingleFunction = true )
972
+ SILVerifier (const SILFunction &F, bool SingleFunction, bool checkLinearLifetime )
973
973
: M(F.getModule().getSwiftModule()), F(F),
974
974
fnConv (F.getConventionsInContext()), TC(F.getModule().Types),
975
975
SingleFunction(SingleFunction),
976
+ checkLinearLifetime(checkLinearLifetime),
976
977
Dominance(nullptr ),
977
978
InstNumbers(numInstsInFunction(F)),
978
979
loadBorrowImmutabilityAnalysis(DEBlocks.get(), &F) {
@@ -6423,7 +6424,7 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
6423
6424
}
6424
6425
}
6425
6426
6426
- void verify (bool isCompleteOSSA, bool checkLinearLifetimes ) {
6427
+ void verify (bool isCompleteOSSA) {
6427
6428
if (!isCompleteOSSA || !F.getModule ().getOptions ().OSSACompleteLifetimes ) {
6428
6429
DEBlocks = std::make_unique<DeadEndBlocks>(const_cast <SILFunction *>(&F));
6429
6430
}
@@ -6467,14 +6468,15 @@ void SILFunction::verify(bool SingleFunction, bool isCompleteOSSA,
6467
6468
// Please put all checks in visitSILFunction in SILVerifier, not here. This
6468
6469
// ensures that the pretty stack trace in the verifier is included with the
6469
6470
// back trace when the verifier crashes.
6470
- SILVerifier (*this , SingleFunction).verify (isCompleteOSSA, checkLinearLifetime );
6471
+ SILVerifier (*this , SingleFunction, checkLinearLifetime ).verify (isCompleteOSSA);
6471
6472
}
6472
6473
6473
6474
void SILFunction::verifyCriticalEdges () const {
6474
6475
if (!verificationEnabled (getModule ()))
6475
6476
return ;
6476
6477
6477
- SILVerifier (*this , /* SingleFunction=*/ true ).verifyBranches (this );
6478
+ SILVerifier (*this , /* SingleFunction=*/ true ,
6479
+ /* checkLinearLifetime=*/ false ).verifyBranches (this );
6478
6480
}
6479
6481
6480
6482
// / Verify that a property descriptor follows invariants.
@@ -6591,7 +6593,8 @@ void SILVTable::verify(const SILModule &M) const {
6591
6593
}
6592
6594
6593
6595
if (M.getStage () != SILStage::Lowered) {
6594
- SILVerifier (*entry.getImplementation ())
6596
+ SILVerifier (*entry.getImplementation (), /* SingleFunction=*/ true ,
6597
+ /* checkLinearLifetime=*/ false )
6595
6598
.requireABICompatibleFunctionTypes (
6596
6599
baseInfo.getSILType ().castTo <SILFunctionType>(),
6597
6600
entry.getImplementation ()->getLoweredFunctionType (),
0 commit comments