[llvm] [MIRPrinter] Don't print line break when there is no instructions (PR #80147)
Quentin Dian via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 1 05:13:57 PST 2024
================
@@ -728,7 +728,7 @@ void MIPrinter::print(const MachineBasicBlock &MBB) {
HasLineAttributes = true;
}
- if (HasLineAttributes)
+ if (HasLineAttributes && !MBB.instrs().empty())
----------------
DianQK wrote:
> Can simplify to MBB.empty?
Yes! Done.
https://github.com/llvm/llvm-project/pull/80147
More information about the llvm-commits
mailing list