[llvm] [MC] Add .loc_label instruction (PR #99710)

Paul T Robinson via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 12:05:48 PDT 2024


================
@@ -189,11 +191,24 @@ void MCDwarfLineTable::emitOne(
   for (const MCDwarfLineEntry &LineEntry : LineEntries) {
     MCSymbol *Label = LineEntry.getLabel();
     const MCAsmInfo *asmInfo = MCOS->getContext().getAsmInfo();
+
+    if (LineEntry.LineStreamLabel) {
+      if (!IsAtStartSeq) {
+        MCOS->emitDwarfLineEndEntry(Section, LastLabel);
+        init();
+      }
+      MCOS->emitLabel(LineEntry.LineStreamLabel, LineEntry.StreamLabelDefLoc);
+
+      IsAtStartSeq = true;
----------------
pogo59 wrote:

I think this is redundant. Either it's already true (line 196) or `init()` sets it true.

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


More information about the llvm-commits mailing list