@@ -969,10 +969,11 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
969969 return numInsts;
970970 }
971971
972- SILVerifier (const SILFunction &F, bool SingleFunction = true )
972+ SILVerifier (const SILFunction &F, bool SingleFunction, bool checkLinearLifetime )
973973 : M(F.getModule().getSwiftModule()), F(F),
974974 fnConv (F.getConventionsInContext()), TC(F.getModule().Types),
975975 SingleFunction(SingleFunction),
976+ checkLinearLifetime(checkLinearLifetime),
976977 Dominance(nullptr ),
977978 InstNumbers(numInstsInFunction(F)),
978979 loadBorrowImmutabilityAnalysis(DEBlocks.get(), &F) {
@@ -6423,7 +6424,7 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
64236424 }
64246425 }
64256426
6426- void verify (bool isCompleteOSSA, bool checkLinearLifetimes ) {
6427+ void verify (bool isCompleteOSSA) {
64276428 if (!isCompleteOSSA || !F.getModule ().getOptions ().OSSACompleteLifetimes ) {
64286429 DEBlocks = std::make_unique<DeadEndBlocks>(const_cast <SILFunction *>(&F));
64296430 }
@@ -6467,14 +6468,15 @@ void SILFunction::verify(bool SingleFunction, bool isCompleteOSSA,
64676468 // Please put all checks in visitSILFunction in SILVerifier, not here. This
64686469 // ensures that the pretty stack trace in the verifier is included with the
64696470 // back trace when the verifier crashes.
6470- SILVerifier (*this , SingleFunction).verify (isCompleteOSSA, checkLinearLifetime );
6471+ SILVerifier (*this , SingleFunction, checkLinearLifetime ).verify (isCompleteOSSA);
64716472}
64726473
64736474void SILFunction::verifyCriticalEdges () const {
64746475 if (!verificationEnabled (getModule ()))
64756476 return ;
64766477
6477- SILVerifier (*this , /* SingleFunction=*/ true ).verifyBranches (this );
6478+ SILVerifier (*this , /* SingleFunction=*/ true ,
6479+ /* checkLinearLifetime=*/ false ).verifyBranches (this );
64786480}
64796481
64806482// / Verify that a property descriptor follows invariants.
@@ -6591,7 +6593,8 @@ void SILVTable::verify(const SILModule &M) const {
65916593 }
65926594
65936595 if (M.getStage () != SILStage::Lowered) {
6594- SILVerifier (*entry.getImplementation ())
6596+ SILVerifier (*entry.getImplementation (), /* SingleFunction=*/ true ,
6597+ /* checkLinearLifetime=*/ false )
65956598 .requireABICompatibleFunctionTypes (
65966599 baseInfo.getSILType ().castTo <SILFunctionType>(),
65976600 entry.getImplementation ()->getLoweredFunctionType (),
0 commit comments