@@ -175,7 +175,9 @@ struct MoveOnlyObjectCheckerPImpl {
175175 : fn(fn), allocator(allocator), diagnosticEmitter(diagnosticEmitter),
176176 moveIntroducersToProcess (moveIntroducersToProcess) {}
177177
178- void check (DominanceInfo *domTree, PostOrderAnalysis *poa);
178+ void check (DominanceInfo *domTree,
179+ DeadEndBlocksAnalysis *deadEndBlocksAnalysis,
180+ PostOrderAnalysis *poa);
179181
180182 bool convertBorrowExtractsToOwnedDestructures (
181183 MarkUnresolvedNonCopyableValueInst *mmci, DominanceInfo *domTree,
@@ -331,8 +333,9 @@ bool MoveOnlyObjectCheckerPImpl::checkForSameInstMultipleUseErrors(
331333// MARK: Main PImpl Routine
332334// ===----------------------------------------------------------------------===//
333335
334- void MoveOnlyObjectCheckerPImpl::check (DominanceInfo *domTree,
335- PostOrderAnalysis *poa) {
336+ void MoveOnlyObjectCheckerPImpl::check (
337+ DominanceInfo *domTree, DeadEndBlocksAnalysis *deadEndBlocksAnalysis,
338+ PostOrderAnalysis *poa) {
336339 auto callbacks =
337340 InstModCallbacks ().onDelete ([&](SILInstruction *instToDelete) {
338341 if (auto *mvi =
@@ -341,7 +344,7 @@ void MoveOnlyObjectCheckerPImpl::check(DominanceInfo *domTree,
341344 instToDelete->eraseFromParent ();
342345 });
343346 InstructionDeleter deleter (std::move (callbacks));
344- OSSACanonicalizer canonicalizer (fn, domTree, deleter);
347+ OSSACanonicalizer canonicalizer (fn, domTree, deadEndBlocksAnalysis, deleter);
345348 diagnosticEmitter.initCanonicalizer (&canonicalizer);
346349
347350 unsigned initialDiagCount = diagnosticEmitter.getDiagnosticCount ();
@@ -561,6 +564,6 @@ bool MoveOnlyObjectChecker::check(
561564 " Should only call this with actual insts to check?!" );
562565 MoveOnlyObjectCheckerPImpl checker (instsToCheck[0 ]->getFunction (), allocator,
563566 diagnosticEmitter, instsToCheck);
564- checker.check (domTree, poa);
567+ checker.check (domTree, deadEndBlocksAnalysis, poa);
565568 return checker.changed ;
566569}
0 commit comments