diff options
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index 05bb320d8e6..297e1f813a0 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -473,10 +473,12 @@ void MIPrinter::print(const MachineBasicBlock &MBB) { assert(TRI && "Expected target register info"); if (!MBB.livein_empty()) { OS.indent(2) << "liveins: "; - for (auto I = MBB.livein_begin(), E = MBB.livein_end(); I != E; ++I) { - if (I != MBB.livein_begin()) + bool First = true; + for (unsigned LI : MBB.liveins()) { + if (!First) OS << ", "; - printReg(*I, OS, TRI); + First = false; + printReg(LI, OS, TRI); } OS << "\n"; HasLineAttributes = true; |