[llvm] [DWARF] Emit line 0 source locations for BB padding nops (PR #99496)

Paul T Robinson via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 09:15:06 PDT 2024


================
@@ -3964,10 +3964,14 @@ void AsmPrinter::emitBasicBlockStart(const MachineBasicBlock &MBB) {
     CurrentSectionBeginSym = MBB.getSymbol();
   }
 
+  for (auto &Handler : DebugHandlers)
+    Handler->beginCodeAlignment(MBB);
+
   // Emit an alignment directive for this block, if needed.
   const Align Alignment = MBB.getAlignment();
-  if (Alignment != Align(1))
+  if (Alignment != Align(1)) {
     emitAlignment(Alignment, nullptr, MBB.getMaxBytesForAlignment());
+  }
----------------
pogo59 wrote:

If this isn't going to change, don't keep the braces.

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


More information about the llvm-commits mailing list