@@ -590,16 +590,6 @@ void SILGenFunction::emitCaptures(SILLocation loc,
590590    break ;
591591  }
592592
593-   LLVM_DEBUG ({
594-     llvm::dbgs () << " JQ: emit captures running\n " 
595-     for  (auto  capture : captureInfo.getCaptures ()) {
596-       llvm::dbgs () << "   cap: '" getDecl ()->getName () << " '\n " 
597-     }
598-     llvm::dbgs ()
599-       << "   canGuarantee: '" " '\n " 
600-       << "   capCanEscape: '" " '\n " 
601-   });
602- 
603593  auto  expansion = getTypeExpansionContext ();
604594
605595  for  (auto  capture : captureInfo.getCaptures ()) {
@@ -619,7 +609,6 @@ void SILGenFunction::emitCaptures(SILLocation loc,
619609    if  (capture.isOpaqueValue () || capture.isPackElement ()) {
620610      capturedArgs.push_back (
621611          emitRValueAsSingleValue (capture.getExpr ()).ensurePlusOne (*this , loc));
622-       LLVM_DEBUG (llvm::dbgs () << " JQ: cap emit early ret: opaque || pack\n " 
623612      continue ;
624613    }
625614
@@ -643,52 +632,6 @@ void SILGenFunction::emitCaptures(SILLocation loc,
643632    auto  valueType = FunctionDC->mapTypeIntoContext (
644633      interfaceType->getReferenceStorageReferent ());
645634
646-     LLVM_DEBUG (
647-     {
648-       llvm::dbgs () << " === DEBUG: VarLocs contents for capture of '" 
649-       << vd->getBaseIdentifier () << " ' ===\n " 
650-       llvm::dbgs () << " Total entries in VarLocs: " size () << " \n " 
651- 
652-       for  (auto  &entry : VarLocs) {
653-         auto  *var = entry.first ;
654-         auto  &loc = entry.second ;
655- 
656-         llvm::dbgs () << "   - Variable: " getBaseIdentifier () << " \n " 
657-         //       llvm::errs() << "    Type: " << var->getType() << "\n";
658-         llvm::dbgs () << "     Value type: " value ->getType () << " \n " 
659-         llvm::dbgs () << "     Value kind: " 
660- 
661-         if  (isa<SILUndef>(loc.value )) {
662-           llvm::dbgs () << " SILUndef (UNINITIALIZED)\n " 
663-         } else  if  (isa<SILArgument>(loc.value )) {
664-           llvm::dbgs () << " SILArgument\n " 
665-         } else  if  (isa<AllocStackInst>(loc.value )) {
666-           llvm::dbgs () << " AllocStackInst\n " 
667-         } else  if  (isa<AllocBoxInst>(loc.value )) {
668-           llvm::dbgs () << " AllocBoxInst\n " 
669-         } else  {
670-           llvm::dbgs () << " some other inst\n " 
671-         }
672- 
673-         if  (loc.box ) {
674-           llvm::dbgs () << "     Has box: yes\n " 
675-         }
676- 
677-         llvm::dbgs () << " \n " 
678-       }
679- 
680-       llvm::dbgs () << " Looking for variable: " getBaseIdentifier () << " \n " 
681-       auto  found = VarLocs.find (vd);
682-       if  (found == VarLocs.end ()) {
683-         llvm::dbgs () << "   Result: NOT FOUND in VarLocs\n " 
684-       } else  {
685-         llvm::dbgs () << "   Result: FOUND in VarLocs\n " 
686-         llvm::dbgs () << "   Value is undef: " 
687-         << (isa<SILUndef>(found->second .value ) ? " YES" " NO" " \n " 
688-       }
689-       llvm::dbgs () << " ===================================\n\n " 
690-     });
691- 
692635    // 
693636    //  If we haven't emitted the captured value yet, we're forming a closure
694637    //  to a local function before all of its captures have been emitted. Eg,
@@ -752,12 +695,6 @@ void SILGenFunction::emitCaptures(SILLocation loc,
752695    //  expansion context without opaque archetype substitution.
753696    auto  getAddressValue = [&](SILValue entryValue, bool  forceCopy,
754697                               bool  forLValue) -> SILValue {
755-       LLVM_DEBUG ({
756-         llvm::dbgs () << " JQ: get addr value, force copy: " 
757-           << " , for lval: " " \n " 
758-         entryValue->getDefiningInstruction ()->print (llvm::dbgs ());
759-       });
760- 
761698      if  (!SGM.M .useLoweredAddresses () && !forLValue && !isPack) {
762699        //  In opaque values mode, addresses aren't used except by lvalues.
763700        auto  &lowering = getTypeLowering (entryValue->getType ());
@@ -838,11 +775,6 @@ void SILGenFunction::emitCaptures(SILLocation loc,
838775    auto  &Entry = found->second ;
839776    auto  val = Entry.value ;
840777
841-     LLVM_DEBUG ({
842-       auto  capKind = SGM.Types .getDeclCaptureKind (capture, expansion);
843-       llvm::dbgs () << " JQ: cap kind:: " unsigned )capKind << " \n " 
844-     });
845- 
846778    switch  (SGM.Types .getDeclCaptureKind (capture, expansion)) {
847779    case  CaptureKind::Constant: {
848780      assert (!isPack);
@@ -923,12 +855,6 @@ void SILGenFunction::emitCaptures(SILLocation loc,
923855        }
924856        capturedArgs.push_back (ManagedValue::forOwnedAddressRValue (
925857            addr, CleanupHandle::invalid ()));
926- 
927- //         LLVM_DEBUG({
928- //           llvm::dbgs() << "JQ: adding escape to mark for: \n";
929- //           val->getDefiningInstruction()->print(llvm::dbgs());
930- //         });
931- //         escapesToMark.push_back(val);
932858      }
933859      break ;
934860    }
0 commit comments