[llvm] fafbdfe - [Debug-Info] Add names for the debug line prologue.

via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 20:46:37 PST 2021


Author: Esme-Yi
Date: 2021-03-12T04:45:08Z
New Revision: fafbdfe63bb0a24c39268c02778eccef71fb1d76

URL: https://github.com/llvm/llvm-project/commit/fafbdfe63bb0a24c39268c02778eccef71fb1d76
DIFF: https://github.com/llvm/llvm-project/commit/fafbdfe63bb0a24c39268c02778eccef71fb1d76.diff

LOG: [Debug-Info] Add names for the debug line prologue.

Summary: This is a minor patch to add names for the debug line prologue, as a follow-up of D95998.

Reviewed By: dblaikie, ikudrin, shchenz

Differential Revision: https://reviews.llvm.org/D98383

Added: 
    

Modified: 
    llvm/lib/MC/MCDwarf.cpp
    llvm/test/DebugInfo/XCOFF/empty.ll
    llvm/test/DebugInfo/XCOFF/explicit-section.ll
    llvm/test/DebugInfo/XCOFF/function-sections.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 6c23d330e0ea..51e3ac96601c 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -476,10 +476,9 @@ MCDwarfLineTableHeader::Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params,
     MCOS->emitInt8(0); // Segment selector; same as EmitGenDwarfAranges.
   }
 
-  MCSymbol *ProStartSym = context.createTempSymbol();
-
-  // Create a symbol for the end of the prologue (to be set when we get there).
-  MCSymbol *ProEndSym = context.createTempSymbol(); // Lprologue_end
+  // Create symbols for the start/end of the prologue.
+  MCSymbol *ProStartSym = context.createTempSymbol("prologue_start");
+  MCSymbol *ProEndSym = context.createTempSymbol("prologue_end");
 
   // Length of the prologue, is the next 4 bytes (8 bytes for DWARF64). This is
   // actually the length from after the length word, to the end of the prologue.

diff  --git a/llvm/test/DebugInfo/XCOFF/empty.ll b/llvm/test/DebugInfo/XCOFF/empty.ll
index 1e65797f4807..526b90d10ece 100644
--- a/llvm/test/DebugInfo/XCOFF/empty.ll
+++ b/llvm/test/DebugInfo/XCOFF/empty.ll
@@ -180,8 +180,8 @@ entry:
 ; ASM32-NEXT:  L..debug_line_0:
 ; ASM32-NEXT:  .set L..line_table_start0, L..debug_line_0-4
 ; ASM32-NEXT:          .vbyte  2, 4
-; ASM32-NEXT:          .vbyte  4, L..tmp5-L..tmp4
-; ASM32-NEXT:  L..tmp4:
+; ASM32-NEXT:          .vbyte	4, L..prologue_end0-L..prologue_start0
+; ASM32-NEXT:  L..prologue_start0:
 ; ASM32-NEXT:          .byte   4
 ; ASM32-NEXT:          .byte   1
 ; ASM32-NEXT:          .byte   1
@@ -209,7 +209,7 @@ entry:
 ; ASM32-NEXT:          .byte   0
 ; ASM32-NEXT:          .byte   0
 ; ASM32-NEXT:          .byte   0
-; ASM32-NEXT:  L..tmp5:
+; ASM32-NEXT:  L..prologue_end0:
 ; ASM32-NEXT:          .byte   0                               # Set address to L..tmp0
 ; ASM32-NEXT:          .byte   5
 ; ASM32-NEXT:          .byte   2
@@ -381,8 +381,8 @@ entry:
 ; ASM64-NEXT:  L..debug_line_0:
 ; ASM64-NEXT:  .set L..line_table_start0, L..debug_line_0-12
 ; ASM64-NEXT:          .vbyte  2, 4
-; ASM64-NEXT:          .vbyte  8, L..tmp5-L..tmp4
-; ASM64-NEXT:  L..tmp4:
+; ASM64-NEXT:          .vbyte  8, L..prologue_end0-L..prologue_start0
+; ASM64-NEXT:  L..prologue_start0:
 ; ASM64-NEXT:          .byte   4
 ; ASM64-NEXT:          .byte   1
 ; ASM64-NEXT:          .byte   1
@@ -410,7 +410,7 @@ entry:
 ; ASM64-NEXT:          .byte   0
 ; ASM64-NEXT:          .byte   0
 ; ASM64-NEXT:          .byte   0
-; ASM64-NEXT:  L..tmp5:
+; ASM64-NEXT:  L..prologue_end0:
 ; ASM64-NEXT:          .byte   0                               # Set address to L..tmp0
 ; ASM64-NEXT:          .byte   9
 ; ASM64-NEXT:          .byte   2

diff  --git a/llvm/test/DebugInfo/XCOFF/explicit-section.ll b/llvm/test/DebugInfo/XCOFF/explicit-section.ll
index cf6caa236b12..4839fb83e550 100644
--- a/llvm/test/DebugInfo/XCOFF/explicit-section.ll
+++ b/llvm/test/DebugInfo/XCOFF/explicit-section.ll
@@ -252,8 +252,8 @@ entry:
 ; CHECK-NEXT:  L..debug_line_0:
 ; CHECK-NEXT:  .set L..line_table_start0, L..debug_line_0-4
 ; CHECK-NEXT:          .vbyte  2, 3
-; CHECK-NEXT:          .vbyte  4, L..tmp9-L..tmp8
-; CHECK-NEXT:  L..tmp8:
+; CHECK-NEXT:          .vbyte  4, L..prologue_end0-L..prologue_start0
+; CHECK-NEXT:  L..prologue_start0:
 ; CHECK-NEXT:          .byte   4
 ; CHECK-NEXT:          .byte   1
 ; CHECK-NEXT:          .byte   -5
@@ -280,7 +280,7 @@ entry:
 ; CHECK-NEXT:          .byte   0
 ; CHECK-NEXT:          .byte   0
 ; CHECK-NEXT:          .byte   0
-; CHECK-NEXT:  L..tmp9:
+; CHECK-NEXT:  L..prologue_end0:
 ; CHECK-NEXT:          .byte   0                               # Set address to L..tmp0
 ; CHECK-NEXT:          .byte   5
 ; CHECK-NEXT:          .byte   2

diff  --git a/llvm/test/DebugInfo/XCOFF/function-sections.ll b/llvm/test/DebugInfo/XCOFF/function-sections.ll
index 7e5f983c4967..cdcd01cd2119 100644
--- a/llvm/test/DebugInfo/XCOFF/function-sections.ll
+++ b/llvm/test/DebugInfo/XCOFF/function-sections.ll
@@ -239,8 +239,8 @@ entry:
 ; CHECK-NEXT:  L..debug_line_0:
 ; CHECK-NEXT:  .set L..line_table_start0, L..debug_line_0-4
 ; CHECK-NEXT:          .vbyte  2, 3
-; CHECK-NEXT:          .vbyte  4, L..tmp7-L..tmp6
-; CHECK-NEXT:  L..tmp6:
+; CHECK-NEXT:          .vbyte  4, L..prologue_end0-L..prologue_start0
+; CHECK-NEXT:  L..prologue_start0:
 ; CHECK-NEXT:          .byte   4
 ; CHECK-NEXT:          .byte   1
 ; CHECK-NEXT:          .byte   -5
@@ -267,7 +267,7 @@ entry:
 ; CHECK-NEXT:          .byte   0
 ; CHECK-NEXT:          .byte   0
 ; CHECK-NEXT:          .byte   0
-; CHECK-NEXT:  L..tmp7:
+; CHECK-NEXT:  L..prologue_end0:
 ; CHECK-NEXT:          .byte   0                               # Set address to L..tmp0
 ; CHECK-NEXT:          .byte   5
 ; CHECK-NEXT:          .byte   2


        


More information about the llvm-commits mailing list