xref: /llvm-project/llvm/test/DebugInfo/AArch64/debugline-endsequence.ll (revision b0343a38a5910e980bb031e4014655d77cd0c162)
1; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump --debug-line - | FileCheck %s
2
3target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
4target triple = "arm64-apple-macosx12.0.0"
5
6; Check if the end_sequences are emitted for each debug range.
7
8; CU1 Line table
9; CHECK: 0x0000000000000004 [[T:.*]] end_sequence
10; CHECK: 0x0000000000000010 [[T:.*]] end_sequence
11;
12; CU2 Line table
13; CHECK: 0x0000000000000008 [[T:.*]] end_sequence
14
15; CU1 (0x0 ~ 0x4)
16define void @f1() !dbg !15 {
17  ret void, !dbg !18
18}
19
20; CU2 (0x4 ~ 0x8)
21define void @f2() !dbg !21 {
22  ret void, !dbg !22
23}
24
25; CU2 (nodebug) - (0x8 ~ 0xc)
26define void @f3() {
27  ret void
28}
29
30; CU1 (0xc ~ 0x10)
31define void @f4() !dbg !19 {
32  ret void, !dbg !20
33}
34
35!llvm.dbg.cu = !{!0, !3}
36!llvm.ident = !{!5, !5}
37!llvm.module.flags = !{!6, !7, !8, !9, !10, !11, !12, !13, !14}
38
39!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "LLVM", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None, sysroot: "/")
40!1 = !DIFile(filename: "<stdin>", directory: "/")
41!2 = !{}
42!3 = distinct !DICompileUnit(language: DW_LANG_C99, file: !4, producer: "LLVM", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None, sysroot: "/")
43!4 = !DIFile(filename: "<stdin>", directory: "/")
44!5 = !{!"Apple clang version 13.0.0 (clang-1300.0.29.3)"}
45!6 = !{i32 2, !"SDK Version", [2 x i32] [i32 11, i32 3]}
46!7 = !{i32 7, !"Dwarf Version", i32 4}
47!8 = !{i32 2, !"Debug Info Version", i32 3}
48!9 = !{i32 1, !"wchar_size", i32 4}
49!10 = !{i32 8, !"branch-target-enforcement", i32 0}
50!11 = !{i32 8, !"sign-return-address", i32 0}
51!12 = !{i32 8, !"sign-return-address-all", i32 0}
52!13 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
53!14 = !{i32 7, !"PIC Level", i32 2}
54!15 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 1, type: !16, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
55!16 = !DISubroutineType(types: !17)
56!17 = !{null}
57!18 = !DILocation(line: 2, column: 1, scope: !15)
58!19 = distinct !DISubprogram(name: "f4", scope: !1, file: !1, line: 4, type: !16, scopeLine: 4, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
59!20 = !DILocation(line: 5, column: 1, scope: !19)
60!21 = distinct !DISubprogram(name: "f2", scope: !4, file: !4, line: 1, type: !16, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !3, retainedNodes: !2)
61!22 = !DILocation(line: 2, column: 1, scope: !21)
62