Skip to content

Conversation

dwblaikie
Copy link
Collaborator

Reverts #157529

Sorry, I missed that the missed that the LLVM test was using clang - layering dictates thats not OK. Please readjust the test case to work like the existing test coverage (or perhaps the existing test coverage is sufficient?) and post a new PR.

@dwblaikie dwblaikie added the skip-precommit-approval PR for CI feedback, not intended for review label Sep 12, 2025
@dwblaikie dwblaikie enabled auto-merge (squash) September 12, 2025 18:25
@llvmbot llvmbot added debuginfo llvm:mc Machine (object) code labels Sep 12, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 12, 2025

@llvm/pr-subscribers-debuginfo

Author: David Blaikie (dwblaikie)

Changes

Reverts llvm/llvm-project#157529

Sorry, I missed that the missed that the LLVM test was using clang - layering dictates thats not OK. Please readjust the test case to work like the existing test coverage (or perhaps the existing test coverage is sufficient?) and post a new PR.


Full diff: https://github.com/llvm/llvm-project/pull/158343.diff

4 Files Affected:

  • (modified) llvm/lib/MC/MCDwarf.cpp (+10-20)
  • (removed) llvm/test/DebugInfo/ARM/stmt_seq_macho.test (-98)
  • (modified) llvm/test/DebugInfo/X86/DW_AT_LLVM_stmt_seq_sec_offset.ll (+14-15)
  • (modified) llvm/test/MC/ELF/debug-loc-label.s (+25-29)
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index e8f000a584839..e7c0d37e8f99b 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -181,7 +181,7 @@ void MCDwarfLineTable::emitOne(
 
   unsigned FileNum, LastLine, Column, Flags, Isa, Discriminator;
   bool IsAtStartSeq;
-  MCSymbol *PrevLabel;
+  MCSymbol *LastLabel;
   auto init = [&]() {
     FileNum = 1;
     LastLine = 1;
@@ -189,31 +189,21 @@ void MCDwarfLineTable::emitOne(
     Flags = DWARF2_LINE_DEFAULT_IS_STMT ? DWARF2_FLAG_IS_STMT : 0;
     Isa = 0;
     Discriminator = 0;
-    PrevLabel = nullptr;
+    LastLabel = nullptr;
     IsAtStartSeq = true;
   };
   init();
 
   // Loop through each MCDwarfLineEntry and encode the dwarf line number table.
   bool EndEntryEmitted = false;
-  for (auto It = LineEntries.begin(); It != LineEntries.end(); ++It) {
-    auto LineEntry = *It;
-    MCSymbol *CurrLabel = LineEntry.getLabel();
+  for (const MCDwarfLineEntry &LineEntry : LineEntries) {
+    MCSymbol *Label = LineEntry.getLabel();
     const MCAsmInfo *asmInfo = MCOS->getContext().getAsmInfo();
 
     if (LineEntry.LineStreamLabel) {
       if (!IsAtStartSeq) {
-        auto *Label = CurrLabel;
-        auto NextIt = It + 1;
-        // LineEntry with a null Label is probably a fake LineEntry we added
-        // when `-emit-func-debug-line-table-offsets` in order to terminate the
-        // sequence. Look for the next Label if possible, otherwise we will set
-        // the PC to the end of the section.
-        if (!Label && NextIt != LineEntries.end()) {
-          Label = NextIt->getLabel();
-        }
-        MCOS->emitDwarfLineEndEntry(Section, PrevLabel,
-                                    /*EndLabel =*/Label);
+        MCOS->emitDwarfLineEndEntry(Section, LastLabel,
+                                    /*EndLabel =*/LastLabel);
         init();
       }
       MCOS->emitLabel(LineEntry.LineStreamLabel, LineEntry.StreamLabelDefLoc);
@@ -221,7 +211,7 @@ void MCDwarfLineTable::emitOne(
     }
 
     if (LineEntry.IsEndEntry) {
-      MCOS->emitDwarfAdvanceLineAddr(INT64_MAX, PrevLabel, CurrLabel,
+      MCOS->emitDwarfAdvanceLineAddr(INT64_MAX, LastLabel, Label,
                                      asmInfo->getCodePointerSize());
       init();
       EndEntryEmitted = true;
@@ -268,12 +258,12 @@ void MCDwarfLineTable::emitOne(
     // At this point we want to emit/create the sequence to encode the delta in
     // line numbers and the increment of the address from the previous Label
     // and the current Label.
-    MCOS->emitDwarfAdvanceLineAddr(LineDelta, PrevLabel, CurrLabel,
+    MCOS->emitDwarfAdvanceLineAddr(LineDelta, LastLabel, Label,
                                    asmInfo->getCodePointerSize());
 
     Discriminator = 0;
     LastLine = LineEntry.getLine();
-    PrevLabel = CurrLabel;
+    LastLabel = Label;
     IsAtStartSeq = false;
   }
 
@@ -283,7 +273,7 @@ void MCDwarfLineTable::emitOne(
   // does not track ranges nor terminate the line table. In that case,
   // conservatively use the section end symbol to end the line table.
   if (!EndEntryEmitted && !IsAtStartSeq)
-    MCOS->emitDwarfLineEndEntry(Section, PrevLabel);
+    MCOS->emitDwarfLineEndEntry(Section, LastLabel);
 }
 
 void MCDwarfLineTable::endCurrentSeqAndEmitLineStreamLabel(MCStreamer *MCOS,
diff --git a/llvm/test/DebugInfo/ARM/stmt_seq_macho.test b/llvm/test/DebugInfo/ARM/stmt_seq_macho.test
deleted file mode 100644
index f0874bfc45ed2..0000000000000
--- a/llvm/test/DebugInfo/ARM/stmt_seq_macho.test
+++ /dev/null
@@ -1,98 +0,0 @@
-// RUN: split-file %s %t
-
-// RUN: clang++ --target=arm64-apple-macos11 \
-// RUN:   %t/stmt_seq_macho.cpp -o %t/stmt_seq_macho.o \
-// RUN:   -g -Oz -gdwarf-4 -c -mno-outline \
-// RUN:   -mllvm -emit-func-debug-line-table-offsets \
-// RUN:   -fdebug-compilation-dir=/private/tmp/stmt_seq \
-// RUN:   -fno-unwind-tables -fno-exceptions
-
-// RUN: llvm-dwarfdump -all %t/stmt_seq_macho.o | FileCheck %s
-
-// CHECK:                  Address            Line   Column File   ISA Discriminator OpIndex Flags
-// CHECK-NEXT:             ------------------ ------ ------ ------ --- ------------- ------- -------------
-// CHECK-NEXT:             0x0000000000000000      2     33      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000004      2     33      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x0000000000000004      3     33      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000008      3     33      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x0000000000000008      4     33      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x000000000000000c      4     33      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x000000000000000c      7     10      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000010      7      3      1   0             0       0
-// CHECK-NEXT:             0x0000000000000014      7      3      1   0             0       0  end_sequence
-// CHECK-NEXT:             0x0000000000000014     12     14      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000018     12      5      1   0             0       0
-// CHECK-NEXT:             0x000000000000001c     12      5      1   0             0       0  end_sequence
-// CHECK-NEXT:             0x000000000000001c     16     14      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000020     16      5      1   0             0       0
-// CHECK-NEXT:             0x0000000000000024     16      5      1   0             0       0  end_sequence
-// CHECK-NEXT:             0x0000000000000024     21     14      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000028     21      5      1   0             0       0
-// CHECK-NEXT:             0x000000000000002c     21      5      1   0             0       0  end_sequence
-// CHECK-NEXT:             0x000000000000002c     25     20      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000030     26      5      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000034     26      5      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x0000000000000034     37      0      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000044     39     12      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000050     40     12      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000058     40      9      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x000000000000005c     41     12      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000068     42     12      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000070     41      9      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000074     46     18      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000084     42      9      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000088     47      5      1   0             0       0  is_stmt epilogue_begin
-// CHECK-NEXT:             0x0000000000000098     47      5      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x0000000000000098     34     85      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x000000000000009c     34     85      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x000000000000009c     34     86      1   0             0       0  is_stmt prologue_end
-
-#--- stmt_seq_macho.cpp
-#define ATTRIB extern "C" __attribute__((noinline))
-ATTRIB void function_empty_1() {}
-ATTRIB void function_empty_2() {}
-ATTRIB void function_empty_3() {}
-
-ATTRIB int function1_copy1(int a) {
-  return ++a;
-}
-
-ATTRIB int function3_copy1(int a) {
-    int b = a + 3;
-    return b + 1;
-}
-
-ATTRIB int function2_copy1(int a) {
-    return a - 22;
-}
-
-ATTRIB int function3_copy2(int a) {
-    int b = a + 3;
-    return b + 1;
-}
-
-ATTRIB int function2_copy2(int a) {
-    int result = a - 22;
-    return result;
-}
-
-struct logic_error {
-    logic_error(const char* s) {}
-};
-
-struct length_error : public logic_error {
-    __attribute__((noinline)) explicit length_error(const char* s) : logic_error(s) {}
-};
-
-int main() {
-    int sum = 0;
-    sum += function2_copy2(3);
-    sum += function3_copy2(41);
-    sum += function2_copy1(11);
-    sum += function1_copy1(42);
-    function_empty_1();
-    function_empty_2();
-    function_empty_3();
-    length_error e("test");
-    return sum;
-}
diff --git a/llvm/test/DebugInfo/X86/DW_AT_LLVM_stmt_seq_sec_offset.ll b/llvm/test/DebugInfo/X86/DW_AT_LLVM_stmt_seq_sec_offset.ll
index f17c6e5429b6b..58f6495924b90 100644
--- a/llvm/test/DebugInfo/X86/DW_AT_LLVM_stmt_seq_sec_offset.ll
+++ b/llvm/test/DebugInfo/X86/DW_AT_LLVM_stmt_seq_sec_offset.ll
@@ -14,7 +14,7 @@
 ; STMT_SEQ:       DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset]	(0x00000043)
 ; STMT_SEQ:   DW_AT_name {{.*}}func01
 ; STMT_SEQ:   DW_TAG_subprogram [[[ABBREV_CODE2]]]
-; STMT_SEQ:       DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset]	(0x00000058)
+; STMT_SEQ:       DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset]	(0x00000056)
 ; STMT_SEQ:   DW_AT_name {{.*}}main
 
 ;; Check the entire line sequence to see that it's correct
@@ -29,23 +29,22 @@
 ; STMT_SEQ-NEXT:  0x00000050: 05 DW_LNS_set_column (3)
 ; STMT_SEQ-NEXT:  0x00000052: 67 address += 6,  line += 1,  op-index += 0
 ; STMT_SEQ-NEXT:              0x0000000000000006      6      3      0   0             0       0  is_stmt
-; STMT_SEQ-NEXT:  0x00000053: 02 DW_LNS_advance_pc (addr += 2, op-index += 0)
-; STMT_SEQ-NEXT:  0x00000055: 00 DW_LNE_end_sequence
-; STMT_SEQ-NEXT:              0x0000000000000008      6      3      0   0             0       0  is_stmt end_sequence
-; STMT_SEQ-NEXT:  0x00000058: 04 DW_LNS_set_file (0)
-; STMT_SEQ-NEXT:  0x0000005a: 00 DW_LNE_set_address (0x00000008)
-; STMT_SEQ-NEXT:  0x00000061: 03 DW_LNS_advance_line (10)
-; STMT_SEQ-NEXT:  0x00000063: 01 DW_LNS_copy
+; STMT_SEQ-NEXT:  0x00000053: 00 DW_LNE_end_sequence
+; STMT_SEQ-NEXT:              0x0000000000000006      6      3      0   0             0       0  is_stmt end_sequence
+; STMT_SEQ-NEXT:  0x00000056: 04 DW_LNS_set_file (0)
+; STMT_SEQ-NEXT:  0x00000058: 00 DW_LNE_set_address (0x00000008)
+; STMT_SEQ-NEXT:  0x0000005f: 03 DW_LNS_advance_line (10)
+; STMT_SEQ-NEXT:  0x00000061: 01 DW_LNS_copy
 ; STMT_SEQ-NEXT:              0x0000000000000008     10      0      0   0             0       0  is_stmt
-; STMT_SEQ-NEXT:  0x00000064: 05 DW_LNS_set_column (10)
-; STMT_SEQ-NEXT:  0x00000066: 0a DW_LNS_set_prologue_end
-; STMT_SEQ-NEXT:  0x00000067: 83 address += 8,  line += 1,  op-index += 0
+; STMT_SEQ-NEXT:  0x00000062: 05 DW_LNS_set_column (10)
+; STMT_SEQ-NEXT:  0x00000064: 0a DW_LNS_set_prologue_end
+; STMT_SEQ-NEXT:  0x00000065: 83 address += 8,  line += 1,  op-index += 0
 ; STMT_SEQ-NEXT:              0x0000000000000010     11     10      0   0             0       0  is_stmt prologue_end
-; STMT_SEQ-NEXT:  0x00000068: 05 DW_LNS_set_column (3)
-; STMT_SEQ-NEXT:  0x0000006a: 9f address += 10,  line += 1,  op-index += 0
+; STMT_SEQ-NEXT:  0x00000066: 05 DW_LNS_set_column (3)
+; STMT_SEQ-NEXT:  0x00000068: 9f address += 10,  line += 1,  op-index += 0
 ; STMT_SEQ-NEXT:              0x000000000000001a     12      3      0   0             0       0  is_stmt
-; STMT_SEQ-NEXT:  0x0000006b: 02 DW_LNS_advance_pc (addr += 5, op-index += 0)
-; STMT_SEQ-NEXT:  0x0000006d: 00 DW_LNE_end_sequence
+; STMT_SEQ-NEXT:  0x00000069: 02 DW_LNS_advance_pc (addr += 5, op-index += 0)
+; STMT_SEQ-NEXT:  0x0000006b: 00 DW_LNE_end_sequence
 ; STMT_SEQ-NEXT:              0x000000000000001f     12      3      0   0             0       0  is_stmt end_sequence
 
 ; generated from:
diff --git a/llvm/test/MC/ELF/debug-loc-label.s b/llvm/test/MC/ELF/debug-loc-label.s
index 4200b1192107b..6b5d04777bef4 100644
--- a/llvm/test/MC/ELF/debug-loc-label.s
+++ b/llvm/test/MC/ELF/debug-loc-label.s
@@ -17,47 +17,43 @@
 # CHECK-LINE-TABLE-NEXT: 0x0000002a: 00 DW_LNE_set_address (0x0000000000000000)
 # CHECK-LINE-TABLE-NEXT: 0x00000035: 01 DW_LNS_copy
 # CHECK-LINE-TABLE-NEXT:             0x0000000000000000      1      1      1   0             0       0  is_stmt
-# CHECK-LINE-TABLE-NEXT: 0x00000036: 02 DW_LNS_advance_pc (addr += 8, op-index += 0)
-# CHECK-LINE-TABLE-NEXT: 0x00000038: 00 DW_LNE_end_sequence
-# CHECK-LINE-TABLE-NEXT:             0x0000000000000008      1      1      1   0             0       0  is_stmt end_sequence
-# CHECK-LINE-TABLE-NEXT: 0x0000003b: 05 DW_LNS_set_column (2)
-# CHECK-LINE-TABLE-NEXT: 0x0000003d: 00 DW_LNE_set_address (0x0000000000000008)
-# CHECK-LINE-TABLE-NEXT: 0x00000048: 01 DW_LNS_copy
+# CHECK-LINE-TABLE-NEXT: 0x00000036: 00 DW_LNE_end_sequence
+# CHECK-LINE-TABLE-NEXT:             0x0000000000000000      1      1      1   0             0       0  is_stmt end_sequence
+# CHECK-LINE-TABLE-NEXT: 0x00000039: 05 DW_LNS_set_column (2)
+# CHECK-LINE-TABLE-NEXT: 0x0000003b: 00 DW_LNE_set_address (0x0000000000000008)
+# CHECK-LINE-TABLE-NEXT: 0x00000046: 01 DW_LNS_copy
 # CHECK-LINE-TABLE-NEXT:             0x0000000000000008      1      2      1   0             0       0  is_stmt
-# CHECK-LINE-TABLE-NEXT: 0x00000049: 02 DW_LNS_advance_pc (addr += 8, op-index += 0)
-# CHECK-LINE-TABLE-NEXT: 0x0000004b: 00 DW_LNE_end_sequence
-# CHECK-LINE-TABLE-NEXT:             0x0000000000000010      1      2      1   0             0       0  is_stmt end_sequence
-# CHECK-LINE-TABLE-NEXT: 0x0000004e: 05 DW_LNS_set_column (3)
-# CHECK-LINE-TABLE-NEXT: 0x00000050: 00 DW_LNE_set_address (0x0000000000000010)
-# CHECK-LINE-TABLE-NEXT: 0x0000005b: 01 DW_LNS_copy
+# CHECK-LINE-TABLE-NEXT: 0x00000047: 00 DW_LNE_end_sequence
+# CHECK-LINE-TABLE-NEXT:             0x0000000000000008      1      2      1   0             0       0  is_stmt end_sequence
+# CHECK-LINE-TABLE-NEXT: 0x0000004a: 05 DW_LNS_set_column (3)
+# CHECK-LINE-TABLE-NEXT: 0x0000004c: 00 DW_LNE_set_address (0x0000000000000010)
+# CHECK-LINE-TABLE-NEXT: 0x00000057: 01 DW_LNS_copy
 # CHECK-LINE-TABLE-NEXT:             0x0000000000000010      1      3      1   0             0       0  is_stmt
-# CHECK-LINE-TABLE-NEXT: 0x0000005c: 02 DW_LNS_advance_pc (addr += 8, op-index += 0)
-# CHECK-LINE-TABLE-NEXT: 0x0000005e: 00 DW_LNE_end_sequence
-# CHECK-LINE-TABLE-NEXT:             0x0000000000000018      1      3      1   0             0       0  is_stmt end_sequence
-# CHECK-LINE-TABLE-NEXT: 0x00000061: 05 DW_LNS_set_column (4)
-# CHECK-LINE-TABLE-NEXT: 0x00000063: 00 DW_LNE_set_address (0x0000000000000018)
-# CHECK-LINE-TABLE-NEXT: 0x0000006e: 01 DW_LNS_copy
+# CHECK-LINE-TABLE-NEXT: 0x00000058: 00 DW_LNE_end_sequence
+# CHECK-LINE-TABLE-NEXT:             0x0000000000000010      1      3      1   0             0       0  is_stmt end_sequence
+# CHECK-LINE-TABLE-NEXT: 0x0000005b: 05 DW_LNS_set_column (4)
+# CHECK-LINE-TABLE-NEXT: 0x0000005d: 00 DW_LNE_set_address (0x0000000000000018)
+# CHECK-LINE-TABLE-NEXT: 0x00000068: 01 DW_LNS_copy
 # CHECK-LINE-TABLE-NEXT:             0x0000000000000018      1      4      1   0             0       0  is_stmt
-# CHECK-LINE-TABLE-NEXT: 0x0000006f: 05 DW_LNS_set_column (5)
-# CHECK-LINE-TABLE-NEXT: 0x00000071: 01 DW_LNS_copy
+# CHECK-LINE-TABLE-NEXT: 0x00000069: 05 DW_LNS_set_column (5)
+# CHECK-LINE-TABLE-NEXT: 0x0000006b: 01 DW_LNS_copy
 # CHECK-LINE-TABLE-NEXT:             0x0000000000000018      1      5      1   0             0       0  is_stmt
-# CHECK-LINE-TABLE-NEXT: 0x00000072: 02 DW_LNS_advance_pc (addr += 8, op-index += 0)
-# CHECK-LINE-TABLE-NEXT: 0x00000074: 00 DW_LNE_end_sequence
-# CHECK-LINE-TABLE-NEXT:             0x0000000000000020      1      5      1   0             0       0  is_stmt end_sequence
+# CHECK-LINE-TABLE-NEXT: 0x0000006c: 00 DW_LNE_end_sequence
+# CHECK-LINE-TABLE-NEXT:             0x0000000000000018      1      5      1   0             0       0  is_stmt end_sequence
 
 # CHECK-SYM:      Symbol table '.symtab' contains 9 entries:
 # CHECK-SYM-NEXT:    Num:    Value          Size Type    Bind   Vis       Ndx Name
 # CHECK-SYM-NEXT:      0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT   UND
 # CHECK-SYM-NEXT:      1: 0000000000000000     0 FILE    LOCAL  DEFAULT   ABS test.c
 # CHECK-SYM-NEXT:      2: 0000000000000000     0 SECTION LOCAL  DEFAULT     2 .text
-# CHECK-SYM-NEXT:      3: 000000000000003b     0 NOTYPE  LOCAL  DEFAULT     3 my_label_02
-# CHECK-SYM-NEXT:      4: 000000000000004e     0 NOTYPE  LOCAL  DEFAULT     3 my_label_03
-# CHECK-SYM-NEXT:      5: 0000000000000061     0 NOTYPE  LOCAL  DEFAULT     3 my_label_04
-# CHECK-SYM-NEXT:      6: 000000000000004e     0 NOTYPE  LOCAL  DEFAULT     3 my_label_03.1
-# CHECK-SYM-NEXT:      7: 0000000000000077     0 NOTYPE  LOCAL  DEFAULT     3 my_label_05
+# CHECK-SYM-NEXT:      3: 0000000000000039     0 NOTYPE  LOCAL  DEFAULT     3 my_label_02
+# CHECK-SYM-NEXT:      4: 000000000000004a     0 NOTYPE  LOCAL  DEFAULT     3 my_label_03
+# CHECK-SYM-NEXT:      5: 000000000000005b     0 NOTYPE  LOCAL  DEFAULT     3 my_label_04
+# CHECK-SYM-NEXT:      6: 000000000000004a     0 NOTYPE  LOCAL  DEFAULT     3 my_label_03.1
+# CHECK-SYM-NEXT:      7: 000000000000006f     0 NOTYPE  LOCAL  DEFAULT     3 my_label_05
 # CHECK-SYM-NEXT:      8: 0000000000000000     0 FUNC    GLOBAL DEFAULT     2 foo
 
-# CHECK-OFFSETS: 0000 3b000000 4e000000 61000000
+# CHECK-OFFSETS: 0000 39000000 4a000000 5b000000
 
 	.text
 	.file	"test.c"

@llvmbot
Copy link
Member

llvmbot commented Sep 12, 2025

@llvm/pr-subscribers-llvm-mc

Author: David Blaikie (dwblaikie)

Changes

Reverts llvm/llvm-project#157529

Sorry, I missed that the missed that the LLVM test was using clang - layering dictates thats not OK. Please readjust the test case to work like the existing test coverage (or perhaps the existing test coverage is sufficient?) and post a new PR.


Full diff: https://github.com/llvm/llvm-project/pull/158343.diff

4 Files Affected:

  • (modified) llvm/lib/MC/MCDwarf.cpp (+10-20)
  • (removed) llvm/test/DebugInfo/ARM/stmt_seq_macho.test (-98)
  • (modified) llvm/test/DebugInfo/X86/DW_AT_LLVM_stmt_seq_sec_offset.ll (+14-15)
  • (modified) llvm/test/MC/ELF/debug-loc-label.s (+25-29)
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index e8f000a584839..e7c0d37e8f99b 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -181,7 +181,7 @@ void MCDwarfLineTable::emitOne(
 
   unsigned FileNum, LastLine, Column, Flags, Isa, Discriminator;
   bool IsAtStartSeq;
-  MCSymbol *PrevLabel;
+  MCSymbol *LastLabel;
   auto init = [&]() {
     FileNum = 1;
     LastLine = 1;
@@ -189,31 +189,21 @@ void MCDwarfLineTable::emitOne(
     Flags = DWARF2_LINE_DEFAULT_IS_STMT ? DWARF2_FLAG_IS_STMT : 0;
     Isa = 0;
     Discriminator = 0;
-    PrevLabel = nullptr;
+    LastLabel = nullptr;
     IsAtStartSeq = true;
   };
   init();
 
   // Loop through each MCDwarfLineEntry and encode the dwarf line number table.
   bool EndEntryEmitted = false;
-  for (auto It = LineEntries.begin(); It != LineEntries.end(); ++It) {
-    auto LineEntry = *It;
-    MCSymbol *CurrLabel = LineEntry.getLabel();
+  for (const MCDwarfLineEntry &LineEntry : LineEntries) {
+    MCSymbol *Label = LineEntry.getLabel();
     const MCAsmInfo *asmInfo = MCOS->getContext().getAsmInfo();
 
     if (LineEntry.LineStreamLabel) {
       if (!IsAtStartSeq) {
-        auto *Label = CurrLabel;
-        auto NextIt = It + 1;
-        // LineEntry with a null Label is probably a fake LineEntry we added
-        // when `-emit-func-debug-line-table-offsets` in order to terminate the
-        // sequence. Look for the next Label if possible, otherwise we will set
-        // the PC to the end of the section.
-        if (!Label && NextIt != LineEntries.end()) {
-          Label = NextIt->getLabel();
-        }
-        MCOS->emitDwarfLineEndEntry(Section, PrevLabel,
-                                    /*EndLabel =*/Label);
+        MCOS->emitDwarfLineEndEntry(Section, LastLabel,
+                                    /*EndLabel =*/LastLabel);
         init();
       }
       MCOS->emitLabel(LineEntry.LineStreamLabel, LineEntry.StreamLabelDefLoc);
@@ -221,7 +211,7 @@ void MCDwarfLineTable::emitOne(
     }
 
     if (LineEntry.IsEndEntry) {
-      MCOS->emitDwarfAdvanceLineAddr(INT64_MAX, PrevLabel, CurrLabel,
+      MCOS->emitDwarfAdvanceLineAddr(INT64_MAX, LastLabel, Label,
                                      asmInfo->getCodePointerSize());
       init();
       EndEntryEmitted = true;
@@ -268,12 +258,12 @@ void MCDwarfLineTable::emitOne(
     // At this point we want to emit/create the sequence to encode the delta in
     // line numbers and the increment of the address from the previous Label
     // and the current Label.
-    MCOS->emitDwarfAdvanceLineAddr(LineDelta, PrevLabel, CurrLabel,
+    MCOS->emitDwarfAdvanceLineAddr(LineDelta, LastLabel, Label,
                                    asmInfo->getCodePointerSize());
 
     Discriminator = 0;
     LastLine = LineEntry.getLine();
-    PrevLabel = CurrLabel;
+    LastLabel = Label;
     IsAtStartSeq = false;
   }
 
@@ -283,7 +273,7 @@ void MCDwarfLineTable::emitOne(
   // does not track ranges nor terminate the line table. In that case,
   // conservatively use the section end symbol to end the line table.
   if (!EndEntryEmitted && !IsAtStartSeq)
-    MCOS->emitDwarfLineEndEntry(Section, PrevLabel);
+    MCOS->emitDwarfLineEndEntry(Section, LastLabel);
 }
 
 void MCDwarfLineTable::endCurrentSeqAndEmitLineStreamLabel(MCStreamer *MCOS,
diff --git a/llvm/test/DebugInfo/ARM/stmt_seq_macho.test b/llvm/test/DebugInfo/ARM/stmt_seq_macho.test
deleted file mode 100644
index f0874bfc45ed2..0000000000000
--- a/llvm/test/DebugInfo/ARM/stmt_seq_macho.test
+++ /dev/null
@@ -1,98 +0,0 @@
-// RUN: split-file %s %t
-
-// RUN: clang++ --target=arm64-apple-macos11 \
-// RUN:   %t/stmt_seq_macho.cpp -o %t/stmt_seq_macho.o \
-// RUN:   -g -Oz -gdwarf-4 -c -mno-outline \
-// RUN:   -mllvm -emit-func-debug-line-table-offsets \
-// RUN:   -fdebug-compilation-dir=/private/tmp/stmt_seq \
-// RUN:   -fno-unwind-tables -fno-exceptions
-
-// RUN: llvm-dwarfdump -all %t/stmt_seq_macho.o | FileCheck %s
-
-// CHECK:                  Address            Line   Column File   ISA Discriminator OpIndex Flags
-// CHECK-NEXT:             ------------------ ------ ------ ------ --- ------------- ------- -------------
-// CHECK-NEXT:             0x0000000000000000      2     33      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000004      2     33      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x0000000000000004      3     33      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000008      3     33      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x0000000000000008      4     33      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x000000000000000c      4     33      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x000000000000000c      7     10      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000010      7      3      1   0             0       0
-// CHECK-NEXT:             0x0000000000000014      7      3      1   0             0       0  end_sequence
-// CHECK-NEXT:             0x0000000000000014     12     14      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000018     12      5      1   0             0       0
-// CHECK-NEXT:             0x000000000000001c     12      5      1   0             0       0  end_sequence
-// CHECK-NEXT:             0x000000000000001c     16     14      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000020     16      5      1   0             0       0
-// CHECK-NEXT:             0x0000000000000024     16      5      1   0             0       0  end_sequence
-// CHECK-NEXT:             0x0000000000000024     21     14      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000028     21      5      1   0             0       0
-// CHECK-NEXT:             0x000000000000002c     21      5      1   0             0       0  end_sequence
-// CHECK-NEXT:             0x000000000000002c     25     20      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000030     26      5      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000034     26      5      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x0000000000000034     37      0      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000044     39     12      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x0000000000000050     40     12      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000058     40      9      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x000000000000005c     41     12      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000068     42     12      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000070     41      9      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000074     46     18      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000084     42      9      1   0             0       0  is_stmt
-// CHECK-NEXT:             0x0000000000000088     47      5      1   0             0       0  is_stmt epilogue_begin
-// CHECK-NEXT:             0x0000000000000098     47      5      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x0000000000000098     34     85      1   0             0       0  is_stmt prologue_end
-// CHECK-NEXT:             0x000000000000009c     34     85      1   0             0       0  is_stmt end_sequence
-// CHECK-NEXT:             0x000000000000009c     34     86      1   0             0       0  is_stmt prologue_end
-
-#--- stmt_seq_macho.cpp
-#define ATTRIB extern "C" __attribute__((noinline))
-ATTRIB void function_empty_1() {}
-ATTRIB void function_empty_2() {}
-ATTRIB void function_empty_3() {}
-
-ATTRIB int function1_copy1(int a) {
-  return ++a;
-}
-
-ATTRIB int function3_copy1(int a) {
-    int b = a + 3;
-    return b + 1;
-}
-
-ATTRIB int function2_copy1(int a) {
-    return a - 22;
-}
-
-ATTRIB int function3_copy2(int a) {
-    int b = a + 3;
-    return b + 1;
-}
-
-ATTRIB int function2_copy2(int a) {
-    int result = a - 22;
-    return result;
-}
-
-struct logic_error {
-    logic_error(const char* s) {}
-};
-
-struct length_error : public logic_error {
-    __attribute__((noinline)) explicit length_error(const char* s) : logic_error(s) {}
-};
-
-int main() {
-    int sum = 0;
-    sum += function2_copy2(3);
-    sum += function3_copy2(41);
-    sum += function2_copy1(11);
-    sum += function1_copy1(42);
-    function_empty_1();
-    function_empty_2();
-    function_empty_3();
-    length_error e("test");
-    return sum;
-}
diff --git a/llvm/test/DebugInfo/X86/DW_AT_LLVM_stmt_seq_sec_offset.ll b/llvm/test/DebugInfo/X86/DW_AT_LLVM_stmt_seq_sec_offset.ll
index f17c6e5429b6b..58f6495924b90 100644
--- a/llvm/test/DebugInfo/X86/DW_AT_LLVM_stmt_seq_sec_offset.ll
+++ b/llvm/test/DebugInfo/X86/DW_AT_LLVM_stmt_seq_sec_offset.ll
@@ -14,7 +14,7 @@
 ; STMT_SEQ:       DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset]	(0x00000043)
 ; STMT_SEQ:   DW_AT_name {{.*}}func01
 ; STMT_SEQ:   DW_TAG_subprogram [[[ABBREV_CODE2]]]
-; STMT_SEQ:       DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset]	(0x00000058)
+; STMT_SEQ:       DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset]	(0x00000056)
 ; STMT_SEQ:   DW_AT_name {{.*}}main
 
 ;; Check the entire line sequence to see that it's correct
@@ -29,23 +29,22 @@
 ; STMT_SEQ-NEXT:  0x00000050: 05 DW_LNS_set_column (3)
 ; STMT_SEQ-NEXT:  0x00000052: 67 address += 6,  line += 1,  op-index += 0
 ; STMT_SEQ-NEXT:              0x0000000000000006      6      3      0   0             0       0  is_stmt
-; STMT_SEQ-NEXT:  0x00000053: 02 DW_LNS_advance_pc (addr += 2, op-index += 0)
-; STMT_SEQ-NEXT:  0x00000055: 00 DW_LNE_end_sequence
-; STMT_SEQ-NEXT:              0x0000000000000008      6      3      0   0             0       0  is_stmt end_sequence
-; STMT_SEQ-NEXT:  0x00000058: 04 DW_LNS_set_file (0)
-; STMT_SEQ-NEXT:  0x0000005a: 00 DW_LNE_set_address (0x00000008)
-; STMT_SEQ-NEXT:  0x00000061: 03 DW_LNS_advance_line (10)
-; STMT_SEQ-NEXT:  0x00000063: 01 DW_LNS_copy
+; STMT_SEQ-NEXT:  0x00000053: 00 DW_LNE_end_sequence
+; STMT_SEQ-NEXT:              0x0000000000000006      6      3      0   0             0       0  is_stmt end_sequence
+; STMT_SEQ-NEXT:  0x00000056: 04 DW_LNS_set_file (0)
+; STMT_SEQ-NEXT:  0x00000058: 00 DW_LNE_set_address (0x00000008)
+; STMT_SEQ-NEXT:  0x0000005f: 03 DW_LNS_advance_line (10)
+; STMT_SEQ-NEXT:  0x00000061: 01 DW_LNS_copy
 ; STMT_SEQ-NEXT:              0x0000000000000008     10      0      0   0             0       0  is_stmt
-; STMT_SEQ-NEXT:  0x00000064: 05 DW_LNS_set_column (10)
-; STMT_SEQ-NEXT:  0x00000066: 0a DW_LNS_set_prologue_end
-; STMT_SEQ-NEXT:  0x00000067: 83 address += 8,  line += 1,  op-index += 0
+; STMT_SEQ-NEXT:  0x00000062: 05 DW_LNS_set_column (10)
+; STMT_SEQ-NEXT:  0x00000064: 0a DW_LNS_set_prologue_end
+; STMT_SEQ-NEXT:  0x00000065: 83 address += 8,  line += 1,  op-index += 0
 ; STMT_SEQ-NEXT:              0x0000000000000010     11     10      0   0             0       0  is_stmt prologue_end
-; STMT_SEQ-NEXT:  0x00000068: 05 DW_LNS_set_column (3)
-; STMT_SEQ-NEXT:  0x0000006a: 9f address += 10,  line += 1,  op-index += 0
+; STMT_SEQ-NEXT:  0x00000066: 05 DW_LNS_set_column (3)
+; STMT_SEQ-NEXT:  0x00000068: 9f address += 10,  line += 1,  op-index += 0
 ; STMT_SEQ-NEXT:              0x000000000000001a     12      3      0   0             0       0  is_stmt
-; STMT_SEQ-NEXT:  0x0000006b: 02 DW_LNS_advance_pc (addr += 5, op-index += 0)
-; STMT_SEQ-NEXT:  0x0000006d: 00 DW_LNE_end_sequence
+; STMT_SEQ-NEXT:  0x00000069: 02 DW_LNS_advance_pc (addr += 5, op-index += 0)
+; STMT_SEQ-NEXT:  0x0000006b: 00 DW_LNE_end_sequence
 ; STMT_SEQ-NEXT:              0x000000000000001f     12      3      0   0             0       0  is_stmt end_sequence
 
 ; generated from:
diff --git a/llvm/test/MC/ELF/debug-loc-label.s b/llvm/test/MC/ELF/debug-loc-label.s
index 4200b1192107b..6b5d04777bef4 100644
--- a/llvm/test/MC/ELF/debug-loc-label.s
+++ b/llvm/test/MC/ELF/debug-loc-label.s
@@ -17,47 +17,43 @@
 # CHECK-LINE-TABLE-NEXT: 0x0000002a: 00 DW_LNE_set_address (0x0000000000000000)
 # CHECK-LINE-TABLE-NEXT: 0x00000035: 01 DW_LNS_copy
 # CHECK-LINE-TABLE-NEXT:             0x0000000000000000      1      1      1   0             0       0  is_stmt
-# CHECK-LINE-TABLE-NEXT: 0x00000036: 02 DW_LNS_advance_pc (addr += 8, op-index += 0)
-# CHECK-LINE-TABLE-NEXT: 0x00000038: 00 DW_LNE_end_sequence
-# CHECK-LINE-TABLE-NEXT:             0x0000000000000008      1      1      1   0             0       0  is_stmt end_sequence
-# CHECK-LINE-TABLE-NEXT: 0x0000003b: 05 DW_LNS_set_column (2)
-# CHECK-LINE-TABLE-NEXT: 0x0000003d: 00 DW_LNE_set_address (0x0000000000000008)
-# CHECK-LINE-TABLE-NEXT: 0x00000048: 01 DW_LNS_copy
+# CHECK-LINE-TABLE-NEXT: 0x00000036: 00 DW_LNE_end_sequence
+# CHECK-LINE-TABLE-NEXT:             0x0000000000000000      1      1      1   0             0       0  is_stmt end_sequence
+# CHECK-LINE-TABLE-NEXT: 0x00000039: 05 DW_LNS_set_column (2)
+# CHECK-LINE-TABLE-NEXT: 0x0000003b: 00 DW_LNE_set_address (0x0000000000000008)
+# CHECK-LINE-TABLE-NEXT: 0x00000046: 01 DW_LNS_copy
 # CHECK-LINE-TABLE-NEXT:             0x0000000000000008      1      2      1   0             0       0  is_stmt
-# CHECK-LINE-TABLE-NEXT: 0x00000049: 02 DW_LNS_advance_pc (addr += 8, op-index += 0)
-# CHECK-LINE-TABLE-NEXT: 0x0000004b: 00 DW_LNE_end_sequence
-# CHECK-LINE-TABLE-NEXT:             0x0000000000000010      1      2      1   0             0       0  is_stmt end_sequence
-# CHECK-LINE-TABLE-NEXT: 0x0000004e: 05 DW_LNS_set_column (3)
-# CHECK-LINE-TABLE-NEXT: 0x00000050: 00 DW_LNE_set_address (0x0000000000000010)
-# CHECK-LINE-TABLE-NEXT: 0x0000005b: 01 DW_LNS_copy
+# CHECK-LINE-TABLE-NEXT: 0x00000047: 00 DW_LNE_end_sequence
+# CHECK-LINE-TABLE-NEXT:             0x0000000000000008      1      2      1   0             0       0  is_stmt end_sequence
+# CHECK-LINE-TABLE-NEXT: 0x0000004a: 05 DW_LNS_set_column (3)
+# CHECK-LINE-TABLE-NEXT: 0x0000004c: 00 DW_LNE_set_address (0x0000000000000010)
+# CHECK-LINE-TABLE-NEXT: 0x00000057: 01 DW_LNS_copy
 # CHECK-LINE-TABLE-NEXT:             0x0000000000000010      1      3      1   0             0       0  is_stmt
-# CHECK-LINE-TABLE-NEXT: 0x0000005c: 02 DW_LNS_advance_pc (addr += 8, op-index += 0)
-# CHECK-LINE-TABLE-NEXT: 0x0000005e: 00 DW_LNE_end_sequence
-# CHECK-LINE-TABLE-NEXT:             0x0000000000000018      1      3      1   0             0       0  is_stmt end_sequence
-# CHECK-LINE-TABLE-NEXT: 0x00000061: 05 DW_LNS_set_column (4)
-# CHECK-LINE-TABLE-NEXT: 0x00000063: 00 DW_LNE_set_address (0x0000000000000018)
-# CHECK-LINE-TABLE-NEXT: 0x0000006e: 01 DW_LNS_copy
+# CHECK-LINE-TABLE-NEXT: 0x00000058: 00 DW_LNE_end_sequence
+# CHECK-LINE-TABLE-NEXT:             0x0000000000000010      1      3      1   0             0       0  is_stmt end_sequence
+# CHECK-LINE-TABLE-NEXT: 0x0000005b: 05 DW_LNS_set_column (4)
+# CHECK-LINE-TABLE-NEXT: 0x0000005d: 00 DW_LNE_set_address (0x0000000000000018)
+# CHECK-LINE-TABLE-NEXT: 0x00000068: 01 DW_LNS_copy
 # CHECK-LINE-TABLE-NEXT:             0x0000000000000018      1      4      1   0             0       0  is_stmt
-# CHECK-LINE-TABLE-NEXT: 0x0000006f: 05 DW_LNS_set_column (5)
-# CHECK-LINE-TABLE-NEXT: 0x00000071: 01 DW_LNS_copy
+# CHECK-LINE-TABLE-NEXT: 0x00000069: 05 DW_LNS_set_column (5)
+# CHECK-LINE-TABLE-NEXT: 0x0000006b: 01 DW_LNS_copy
 # CHECK-LINE-TABLE-NEXT:             0x0000000000000018      1      5      1   0             0       0  is_stmt
-# CHECK-LINE-TABLE-NEXT: 0x00000072: 02 DW_LNS_advance_pc (addr += 8, op-index += 0)
-# CHECK-LINE-TABLE-NEXT: 0x00000074: 00 DW_LNE_end_sequence
-# CHECK-LINE-TABLE-NEXT:             0x0000000000000020      1      5      1   0             0       0  is_stmt end_sequence
+# CHECK-LINE-TABLE-NEXT: 0x0000006c: 00 DW_LNE_end_sequence
+# CHECK-LINE-TABLE-NEXT:             0x0000000000000018      1      5      1   0             0       0  is_stmt end_sequence
 
 # CHECK-SYM:      Symbol table '.symtab' contains 9 entries:
 # CHECK-SYM-NEXT:    Num:    Value          Size Type    Bind   Vis       Ndx Name
 # CHECK-SYM-NEXT:      0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT   UND
 # CHECK-SYM-NEXT:      1: 0000000000000000     0 FILE    LOCAL  DEFAULT   ABS test.c
 # CHECK-SYM-NEXT:      2: 0000000000000000     0 SECTION LOCAL  DEFAULT     2 .text
-# CHECK-SYM-NEXT:      3: 000000000000003b     0 NOTYPE  LOCAL  DEFAULT     3 my_label_02
-# CHECK-SYM-NEXT:      4: 000000000000004e     0 NOTYPE  LOCAL  DEFAULT     3 my_label_03
-# CHECK-SYM-NEXT:      5: 0000000000000061     0 NOTYPE  LOCAL  DEFAULT     3 my_label_04
-# CHECK-SYM-NEXT:      6: 000000000000004e     0 NOTYPE  LOCAL  DEFAULT     3 my_label_03.1
-# CHECK-SYM-NEXT:      7: 0000000000000077     0 NOTYPE  LOCAL  DEFAULT     3 my_label_05
+# CHECK-SYM-NEXT:      3: 0000000000000039     0 NOTYPE  LOCAL  DEFAULT     3 my_label_02
+# CHECK-SYM-NEXT:      4: 000000000000004a     0 NOTYPE  LOCAL  DEFAULT     3 my_label_03
+# CHECK-SYM-NEXT:      5: 000000000000005b     0 NOTYPE  LOCAL  DEFAULT     3 my_label_04
+# CHECK-SYM-NEXT:      6: 000000000000004a     0 NOTYPE  LOCAL  DEFAULT     3 my_label_03.1
+# CHECK-SYM-NEXT:      7: 000000000000006f     0 NOTYPE  LOCAL  DEFAULT     3 my_label_05
 # CHECK-SYM-NEXT:      8: 0000000000000000     0 FUNC    GLOBAL DEFAULT     2 foo
 
-# CHECK-OFFSETS: 0000 3b000000 4e000000 61000000
+# CHECK-OFFSETS: 0000 39000000 4a000000 5b000000
 
 	.text
 	.file	"test.c"

@dwblaikie dwblaikie disabled auto-merge September 12, 2025 20:04
@dwblaikie dwblaikie merged commit aabf18d into main Sep 12, 2025
8 of 9 checks passed
@dwblaikie dwblaikie deleted the revert-157529-CorrectLineTable branch September 12, 2025 20:04
@llvm-ci
Copy link
Collaborator

llvm-ci commented Sep 12, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-ppc64le-linux running on ppc64le-sanitizer while building llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/15038

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure) (timed out)
...
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-funwind-tables', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/utils/lit/lit/discovery.py:276: warning: input '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/test/sanitizer_common/Unit' contained no tests
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
command timed out: 1800 seconds without output running [b'python', b'../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=5782.248691
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Step 14 (test standalone compiler-rt) failure: test standalone compiler-rt (failure)
...
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cstdio.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cstdlib.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cstring.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/ctime.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cuchar.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cwchar.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat/cwctype.inc
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.cppm
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/tsan/libcxx_tsan_powerpc64le/share/libc++/v1/std.compat.cppm
-- Installing: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/tsan/libcxx_tsan_powerpc64le/lib/libc++.modules.json
[104/114] Generating libmsan_loadable.powerpc64le.so
[106/114] Generating MSAN_INST_TEST_OBJECTS.msan_test_main.cpp.powerpc64le-with-call.o
[107/114] Generating MSAN_INST_TEST_OBJECTS.msan_test_main.cpp.powerpc64le.o
[108/114] Generating MSAN_INST_GTEST.gtest-all.cc.powerpc64le-with-call.o
[109/114] Generating MSAN_INST_GTEST.gtest-all.cc.powerpc64le.o
[110/114] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.powerpc64le-with-call.o
[111/114] Generating Msan-powerpc64le-with-call-Test
[112/114] Generating MSAN_INST_TEST_OBJECTS.msan_test.cpp.powerpc64le.o
[113/114] Generating Msan-powerpc64le-Test
[113/114] Running compiler_rt regression tests
-- Testing: 5239 tests, 1152 workers --
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-Wthread-safety', '-Wthread-safety-reference', '-Wthread-safety-beta', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/utils/lit/lit/discovery.py:276: warning: input '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/test/interception/Unit' contained no tests
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-funwind-tables', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-funwind-tables', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-funwind-tables', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-funwind-tables', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-funwind-tables', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/llvm/utils/lit/lit/discovery.py:276: warning: input '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/test/sanitizer_common/Unit' contained no tests
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].
llvm-lit: /home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/test/lit.common.cfg.py:60: warning: Path reported by clang does not exist: "/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/powerpc64le-unknown-linux-gnu". This path was found by running ['/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/bin/clang', '--target=powerpc64le-unknown-linux-gnu', '-m64', '-fno-function-sections', '-nobuiltininc', '-I/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm-project/compiler-rt/include', '-idirafter', '/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/build_default/lib/clang/22/include', '-resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build', '-Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64le-sanitizer/sanitizer-ppc64le/build/compiler_rt_build/lib/linux', '-print-runtime-dir'].

command timed out: 1800 seconds without output running [b'python', b'../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=5782.248691
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..

DataCorrupted added a commit to DataCorrupted/llvm-project that referenced this pull request Sep 12, 2025
dwblaikie pushed a commit that referenced this pull request Sep 16, 2025
This reverts commit aabf18d.
#157529 included a test that used clang, which doesn't exists in some
CI. #158343 reverts it.

This PR reapplies the original patch with the incorrect test removed.

### Context

#99710 introduced `.loc_label` so we can terminate a line sequence.
However, it did not advance PC properly. This is problematic for
1-instruction functions as it will have zero-length sequence. The test
checked in that PR shows the problem:

```
# CHECK-LINE-TABLE:                  Address            Line   Column File   ISA Discriminator OpIndex Flags
# CHECK-LINE-TABLE-NEXT:             ------------------ ------ ------ ------ --- ------------- ------- -------------
# CHECK-LINE-TABLE-NEXT: 0x00000028: 05 DW_LNS_set_column (1)
# CHECK-LINE-TABLE-NEXT: 0x0000002a: 00 DW_LNE_set_address (0x0000000000000000)
# CHECK-LINE-TABLE-NEXT: 0x00000035: 01 DW_LNS_copy
# CHECK-LINE-TABLE-NEXT:             0x0000000000000000      1      1      1   0             0       0  is_stmt
# CHECK-LINE-TABLE-NEXT: 0x00000036: 00 DW_LNE_end_sequence
# CHECK-LINE-TABLE-NEXT:             0x0000000000000000      1      1      1   0             0       0  is_stmt end_sequence
```

Both rows having PC 0x0 is incorrect, and parsers won't be able to parse
them. See more explanation why this is wrong in #154851.

### Design

This PR attempts to fix this by advancing the PC to the next available
Label, and advance to the end of the section if no Label is available.

### Implementation

- `emitDwarfLineEndEntry` will advance PC to the `CurrLabel`
- If `CurrLabel` is null, its probably a fake LineEntry we introduced in
#110192. In that case look for the next Label
- If still not label can be found, use `null` and
`emitDwarfLineEndEntry` is smart enough to advance PC to the end of the
section
- Rename `LastLabel` to `PrevLabel`, "last" can mean "previous" or
"final", this is ambigous.
- Updated the tests to emit a correct label.

### Note

This fix should render #154986 and #154851 obsolete, they were temporary
fixes and don't resolve the root cause.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

debuginfo llvm:mc Machine (object) code skip-precommit-approval PR for CI feedback, not intended for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants