From 72518eaa6f5c85a1d633b91a1f0e30b2a84ca275 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Mon, 16 Oct 2017 19:08:41 +0000 Subject: Add iterator range MachineRegisterInfo::liveins(), adopt users, NFC llvm-svn: 315927 --- llvm/lib/CodeGen/MIRPrinter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp') diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index ae1bb36c6aa..528140234ee 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -297,11 +297,11 @@ void MIRPrinter::convert(yaml::MachineFunction &MF, } // Print the live ins. - for (auto I = RegInfo.livein_begin(), E = RegInfo.livein_end(); I != E; ++I) { + for (std::pair LI : RegInfo.liveins()) { yaml::MachineFunctionLiveIn LiveIn; - printReg(I->first, LiveIn.Register, TRI); - if (I->second) - printReg(I->second, LiveIn.VirtualRegister, TRI); + printReg(LI.first, LiveIn.Register, TRI); + if (LI.second) + printReg(LI.second, LiveIn.VirtualRegister, TRI); MF.LiveIns.push_back(LiveIn); } -- cgit v1.2.3