xref: /llvm-project/llvm/test/DebugInfo/X86/arange-and-stub.ll (revision 5a288fa32e0c91b211e39f3e370255916902f898)
1; RUN: llc -generate-arange-section -relocation-model=pic < %s | FileCheck %s
2
3; CHECK:   .data
4; CHECK-NOT: .section
5; CHECK: .L_ZTId.DW.stub:
6
7; CHECK:  .data
8; CHECK-NEXT: .Lsec_end0:
9
10source_filename = "test/DebugInfo/X86/arange-and-stub.ll"
11target triple = "x86_64-linux-gnu"
12
13@_ZTId = external constant ptr
14@zed = global [1 x ptr] [ptr @bar], !dbg !0
15
16define void @foo() !dbg !17 {
17  ret void
18}
19
20define void @bar() personality ptr @foo !dbg !18 {
21  invoke void @foo()
22          to label %invoke.cont unwind label %lpad, !dbg !19
23
24invoke.cont:                                      ; preds = %0
25  ret void
26
27lpad:                                             ; preds = %0
28  %tmp1 = landingpad { ptr, i32 }
29          filter [1 x ptr] [ptr @_ZTId]
30  ret void
31}
32
33!llvm.dbg.cu = !{!2}
34!llvm.module.flags = !{!15, !16}
35
36!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
37!1 = !DIGlobalVariable(name: "zed", scope: !2, file: !6, line: 6, type: !7, isLocal: false, isDefinition: true)
38!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 3.7.0 (trunk 234308) (llvm/trunk 234310)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !4, globals: !5, imports: !4)
39!3 = !DIFile(filename: "/Users/espindola/llvm/<stdin>", directory: "/Users/espindola/llvm/build")
40!4 = !{}
41!5 = !{!0}
42!6 = !DIFile(filename: "/Users/espindola/llvm/test.cpp", directory: "/Users/espindola/llvm/build")
43!7 = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, size: 64, align: 64, elements: !13)
44!8 = !DIDerivedType(tag: DW_TAG_typedef, name: "vifunc", file: !6, line: 5, baseType: !9)
45!9 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !10, size: 64, align: 64)
46!10 = !DISubroutineType(types: !11)
47!11 = !{null, !12}
48!12 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
49!13 = !{!14}
50!14 = !DISubrange(count: 1)
51!15 = !{i32 2, !"Dwarf Version", i32 4}
52!16 = !{i32 2, !"Debug Info Version", i32 3}
53!17 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !6, file: !6, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !2, retainedNodes: !4)
54!18 = distinct !DISubprogram(name: "bar_d", linkageName: "bar", scope: !6, file: !6, line: 3, type: !10, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !2, retainedNodes: !4)
55!19 = !DILocation(line: 0, scope: !18)
56
57