[llvm] 6a80827 - [DebugInfo] add test case for D147506, NFC

Chen Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 21:37:42 PDT 2023


Author: Chen Zheng
Date: 2023-05-04T04:37:27Z
New Revision: 6a808270e8a9becc07857240ebbf6731743a4485

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

LOG: [DebugInfo] add test case for D147506, NFC

[DebugLine] save one debug line entry for empty prologue

Added: 
    llvm/test/DebugInfo/XCOFF/empty-prolog.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/DebugInfo/XCOFF/empty-prolog.ll b/llvm/test/DebugInfo/XCOFF/empty-prolog.ll
new file mode 100644
index 0000000000000..cef5908ffaded
--- /dev/null
+++ b/llvm/test/DebugInfo/XCOFF/empty-prolog.ll
@@ -0,0 +1,32 @@
+
+; RUN: llc -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t %s 
+; RUN: llvm-dwarfdump -debug-line %t | FileCheck %s
+
+; CHECK:        Address            Line   Column File   ISA Discriminator Flags
+; CHECK-NEXT:   ------------------ ------ ------ ------ --- ------------- -------------
+; CHECK-NEXT:   0x0000000000000000      2      0      1   0             0  is_stmt
+; CHECK-NEXT:   0x0000000000000000      3      0      1   0             0  is_stmt prologue_end
+; CHECK-NEXT:   0x000000000000001c      3      0      1   0             0  is_stmt end_sequence
+
+define i32 @main() !dbg !7 {
+entry:
+  ret i32 0, !dbg !12
+}
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!2, !3, !4, !5}
+!llvm.ident = !{!6}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "1.c", directory: "./")
+!2 = !{i32 7, !"Dwarf Version", i32 3}
+!3 = !{i32 2, !"Debug Info Version", i32 3}
+!4 = !{i32 1, !"wchar_size", i32 2}
+!5 = !{i32 8, !"PIC Level", i32 2}
+!6 = !{!"clang"}
+!7 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !8, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !11)
+!8 = !DISubroutineType(types: !9)
+!9 = !{!10}
+!10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!11 = !{}
+!12 = !DILocation(line: 3, scope: !7)


        


More information about the llvm-commits mailing list