[llvm] [MIRPrinter] Don't print line break when there is no instructions (PR #80147)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 20:08:46 PST 2024


================
@@ -728,7 +728,7 @@ void MIPrinter::print(const MachineBasicBlock &MBB) {
     HasLineAttributes = true;
   }
 
-  if (HasLineAttributes)
+  if (HasLineAttributes && !MBB.instrs().empty())
----------------
arsenm wrote:

Can simplify to MBB.empty?

https://github.com/llvm/llvm-project/pull/80147


More information about the llvm-commits mailing list