diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 168a4513b96..4692cbff87d 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -408,12 +408,13 @@ void MachineBasicBlock::print(raw_ostream &OS, ModuleSlotTracker &MST, OS.indent(IsInBundle ? 4 : 2); MI.print(OS, MST, IsStandalone, /*SkipOpers=*/false, /*SkipDebugLoc=*/false, - &TII); + /*AddNewLine=*/false, &TII); if (!IsInBundle && MI.getFlag(MachineInstr::BundledSucc)) { OS << " {"; IsInBundle = true; } + OS << '\n'; } if (IsInBundle) diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 8f5e8e964ae..d3a09f06ebd 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1235,7 +1235,8 @@ LLVM_DUMP_METHOD void MachineInstr::dump() const { #endif void MachineInstr::print(raw_ostream &OS, bool IsStandalone, bool SkipOpers, - bool SkipDebugLoc, const TargetInstrInfo *TII) const { + bool SkipDebugLoc, bool AddNewLine, + const TargetInstrInfo *TII) const { const Module *M = nullptr; const Function *F = nullptr; if (const MachineFunction *MF = getMFIfAvailable(*this)) { @@ -1253,7 +1254,7 @@ void MachineInstr::print(raw_ostream &OS, bool IsStandalone, bool SkipOpers, void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST, bool IsStandalone, bool SkipOpers, bool SkipDebugLoc, - const TargetInstrInfo *TII) const { + bool AddNewLine, const TargetInstrInfo *TII) const { // We can be a bit tidier if we know the MachineFunction. const MachineFunction *MF = nullptr; const TargetRegisterInfo *TRI = nullptr; @@ -1486,7 +1487,8 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST, OS << " indirect"; } - OS << '\n'; + if (AddNewLine) + OS << '\n'; } bool MachineInstr::addRegisterKilled(unsigned IncomingReg, |