@@ -822,7 +822,8 @@ bool ClosureArgDataflowState::process(
822822 for (unsigned i : indices (livenessWorklist)) {
823823 if (auto *ptr = livenessWorklist[i]) {
824824 LLVM_DEBUG (llvm::dbgs ()
825- << " ClosureArgLivenessDataflow. Liveness User: " << *ptr);
825+ << " ClosureArgLivenessDataflow. Final: Liveness User: "
826+ << *ptr);
826827 state.pairedUseInsts .push_back (ptr);
827828 }
828829 }
@@ -1350,6 +1351,7 @@ bool GatherLexicalLifetimeUseVisitor::visitUse(Operand *op,
13501351 auto *func = fas.getCalleeFunction ();
13511352 if (!func || !func->isDefer ())
13521353 return false ;
1354+ LLVM_DEBUG (llvm::dbgs () << " Found closure use: " << *op->getUser ());
13531355 useState.insertClosureOperand (op);
13541356 return true ;
13551357 }
@@ -1595,12 +1597,14 @@ bool DataflowState::process(
15951597 bool emittedSingleDiagnostic = false ;
15961598
15971599 LLVM_DEBUG (llvm::dbgs () << " Checking Multi Block Dataflow for: " << *mvi);
1600+ LLVM_DEBUG (llvm::dbgs () << " Parent Block: bb"
1601+ << mvi->getParent ()->getDebugID () << " \n " );
15981602
15991603 BasicBlockWorklist worklist (fn);
16001604 BasicBlockSetVector visitedBlocks (fn);
16011605 for (auto *succBlock : mvi->getParent ()->getSuccessorBlocks ()) {
16021606 LLVM_DEBUG (llvm::dbgs ()
1603- << " SuccBlocks: " << succBlock->getDebugID () << " \n " );
1607+ << " SuccBlocks: bb " << succBlock->getDebugID () << " \n " );
16041608 worklist.pushIfNotVisited (succBlock);
16051609 visitedBlocks.insert (succBlock);
16061610 }
@@ -1644,7 +1648,8 @@ bool DataflowState::process(
16441648 {
16451649 auto iter = closureUseBlocks.find (next);
16461650 if (iter != closureUseBlocks.end ()) {
1647- LLVM_DEBUG (llvm::dbgs () << " Is Use Block! Emitting Error!\n " );
1651+ LLVM_DEBUG (llvm::dbgs ()
1652+ << " Is Use Block From Closure! Emitting Error!\n " );
16481653 // We found one! Emit the diagnostic and continue and see if we can
16491654 // get more diagnostics.
16501655 auto &astContext = fn->getASTContext ();
@@ -1825,7 +1830,7 @@ void DataflowState::init() {
18251830 }
18261831 }
18271832
1828- for (auto closureUse : useState.closureUses ) {
1833+ for (auto & closureUse : useState.closureUses ) {
18291834 auto *use = closureUse.first ;
18301835 auto &state = closureUse.second ;
18311836 auto *user = use->getUser ();
0 commit comments