63 lines · plain
1; REQUIRES: native && x86_64-linux2 3; In-memory debug-objects contain DWARF4;5; RUN: lli --jit-linker=rtdyld --orc-lazy-debug=jit-debug-objects %s | llvm-dwarfdump --diff - | FileCheck %s6; RUN: lli --jit-linker=jitlink --orc-lazy-debug=jit-debug-objects %s | llvm-dwarfdump --diff - | FileCheck %s7;8; CHECK: -: file format elf64-x86-649; TODO: Synthesized Mach-O objects error out with:10; truncated or malformed object (offset field of section 8 in11; LC_SEGMENT_64 command 0 extends past the end of the file)12;13; CHECK: .debug_info contents:14; CHECK: format = DWARF3215; CHECK: DW_TAG_compile_unit16; CHECK: DW_AT_producer ("clang version 18.0.0git")17; CHECK: DW_AT_language (DW_LANG_C11)18; CHECK: DW_AT_name ("source-file.c")19; CHECK: DW_AT_comp_dir ("/workspace")20; CHECK: DW_TAG_subprogram21; CHECK: DW_AT_frame_base (DW_OP_reg7 RSP)22; CHECK: DW_AT_name ("main")23; CHECK: DW_AT_decl_file ("/workspace/source-file.c")24; CHECK: DW_AT_decl_line (1)25; CHECK: DW_AT_type ("int")26; CHECK: DW_AT_external (true)27; CHECK: DW_TAG_base_type28; CHECK: DW_AT_name ("int")29; CHECK: DW_AT_encoding (DW_ATE_signed)30; CHECK: DW_AT_byte_size (0x04)31; CHECK: NULL32 33; Text section of the in-memory debug-objects have non-null load-address34;35; RUN: lli --jit-linker=rtdyld --orc-lazy-debug=jit-debug-objects %s | \36; RUN: llvm-objdump --section-headers - | \37; RUN: FileCheck --check-prefix=CHECK_LOAD_ADDR %s38; RUN: lli --jit-linker=jitlink --orc-lazy-debug=jit-debug-objects %s | \39; RUN: llvm-objdump --section-headers - | \40; RUN: FileCheck --check-prefix=CHECK_LOAD_ADDR %s41;42; CHECK_LOAD_ADDR: .text43; CHECK_LOAD_ADDR-NOT: 000000000000000044; CHECK_LOAD_ADDR-SAME: TEXT45 46define i32 @main() !dbg !3 {47entry:48 ret i32 0, !dbg !849}50 51!llvm.module.flags = !{!0}52!llvm.dbg.cu = !{!2}53 54!0 = !{i32 2, !"Debug Info Version", i32 3}55!1 = !DIFile(filename: "source-file.c", directory: "/workspace")56!2 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 18.0.0git", emissionKind: FullDebug)57!3 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 1, type: !4, scopeLine: 1, unit: !2, retainedNodes: !7)58!4 = !DISubroutineType(types: !5)59!5 = !{!6}60!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)61!7 = !{}62!8 = !DILocation(line: 1, column: 14, scope: !3)63