1 ; REQUIRES: native && target-x86_64
3 ; RUN: lli --jit-linker=rtdyld \
4 ; RUN: --generate=__dump_jit_debug_descriptor %s | FileCheck %s
6 ; RUN: lli --jit-linker=jitlink \
7 ; RUN: --generate=__dump_jit_debug_descriptor %s | FileCheck %s
9 ; CHECK: Reading __jit_debug_descriptor at 0x{{.*}}
11 ; CHECK: Action: JIT_REGISTER_FN
12 ; CHECK: Entry Symbol File Size Previous Entry
13 ; CHECK: [ 0] 0x{{.*}} 0x{{.*}} {{.*}} 0x0000000000000000
15 target triple = "x86_64-unknown-unknown-elf"
17 ; Built-in symbol provided by the JIT
18 declare void @__dump_jit_debug_descriptor(ptr)
20 ; Host-process symbol from the GDB JIT interface
21 @__jit_debug_descriptor = external global i8, align 1
23 define i32 @main() !dbg !9 {
24 %1 = alloca i32, align 4
25 store i32 0, ptr %1, align 4
26 call void @__dump_jit_debug_descriptor(ptr @__jit_debug_descriptor), !dbg !13
30 !llvm.module.flags = !{!0, !1, !2, !3, !4}
34 !0 = !{i32 2, !"SDK Version", [3 x i32] [i32 10, i32 15, i32 6]}
35 !1 = !{i32 7, !"Dwarf Version", i32 4}
36 !2 = !{i32 2, !"Debug Info Version", i32 3}
37 !3 = !{i32 1, !"wchar_size", i32 4}
38 !4 = !{i32 7, !"PIC Level", i32 2}
39 !5 = distinct !DICompileUnit(language: DW_LANG_C99, file: !6, producer: "compiler version", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !7, nameTableKind: None)
40 !6 = !DIFile(filename: "source-file.c", directory: "/workspace")
42 !8 = !{!"compiler version"}
43 !9 = distinct !DISubprogram(name: "main", scope: !6, file: !6, line: 4, type: !10, scopeLine: 4, spFlags: DISPFlagDefinition, unit: !5, retainedNodes: !7)
44 !10 = !DISubroutineType(types: !11)
46 !12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
47 !13 = !DILocation(line: 5, column: 3, scope: !9)
48 !14 = !DILocation(line: 6, column: 3, scope: !9)