@@ -558,26 +558,29 @@ void MIRPrinter::convertCallSiteObjects(yaml::MachineFunction &YMF,
558558 const MachineFunction &MF,
559559 ModuleSlotTracker &MST) {
560560 const auto *TRI = MF.getSubtarget ().getRegisterInfo ();
561- for (auto CSInfo : MF.getCallSitesInfo ()) {
561+ for (auto CSInfoMap : MF.getCallSitesInfo ()) {
562562 yaml::CallSiteInfo YmlCS;
563563 yaml::MachineInstrLoc CallLocation;
564564
565565 // Prepare instruction position.
566- MachineBasicBlock::const_instr_iterator CallI = CSInfo.first ->getIterator ();
566+ MachineBasicBlock::const_instr_iterator CallI =
567+ CSInfoMap.first ->getIterator ();
567568 CallLocation.BlockNum = CallI->getParent ()->getNumber ();
568569 // Get call instruction offset from the beginning of block.
569570 CallLocation.Offset =
570571 std::distance (CallI->getParent ()->instr_begin (), CallI);
571572 YmlCS.CallLocation = CallLocation;
573+
574+ auto [ArgRegPairs, CalleeTypeIds] = CSInfoMap.second ;
572575 // Construct call arguments and theirs forwarding register info.
573- for (auto ArgReg : CSInfo. second . ArgRegPairs ) {
576+ for (auto ArgReg : ArgRegPairs) {
574577 yaml::CallSiteInfo::ArgRegPair YmlArgReg;
575578 YmlArgReg.ArgNo = ArgReg.ArgNo ;
576579 printRegMIR (ArgReg.Reg , YmlArgReg.Reg , TRI);
577580 YmlCS.ArgForwardingRegs .emplace_back (YmlArgReg);
578581 }
579582 // Get type ids.
580- for (auto *CalleeTypeId : CSInfo. second . CalleeTypeIds ) {
583+ for (auto *CalleeTypeId : CalleeTypeIds) {
581584 YmlCS.CalleeTypeIds .push_back (CalleeTypeId->getZExtValue ());
582585 }
583586 YMF.CallSitesInfo .push_back (std::move (YmlCS));
0 commit comments