1; RUN: llc -split-dwarf-file=test.dwo -dwarf-version=4 %s -mtriple=i386-unknown-linux-gnu -filetype=obj -o - | \ 2; RUN: llvm-dwarfdump -v - | FileCheck %s -check-prefix=DWARF4 3 4; RUN: llc -split-dwarf-file=test.dwo -dwarf-version=5 %s -mtriple=i386-unknown-linux-gnu -filetype=obj -o - | \ 5; RUN: llvm-dwarfdump -v - | FileCheck %s -check-prefix=DWARF5 6 7; Source: 8; void foo() { 9; } 10; 11; void bar() { 12; foo(); 13; } 14 15; DWARF4: .debug_info contents: 16; DWARF4: Compile Unit:{{.*}}version = 0x0004 17; DWARF4-NOT: Compile Unit 18; DWARF4: DW_TAG_compile_unit 19; DWARF4-NOT: DW_TAG_{{.*}} 20; DWARF4: DW_AT_GNU_dwo_name{{.*}}test.dwo 21; DWARF4: DW_AT_GNU_addr_base{{.*}}0x00000000 22; DWARF4: DW_TAG_GNU_call_site 23; DWARF4: DW_AT_low_pc [DW_FORM_GNU_addr_index] (indexed (00000002) address = 0x0000000000000018 ".text") 24; DWARF4: .debug_addr contents: 25; DWARF4-NEXT: 0x00000000: Addr Section: length = 0x00000000, version = 0x0004, addr_size = 0x04, seg_size = 0x00 26; DWARF4-NEXT: Addrs: [ 27; DWARF4-NEXT: 0x00000000 28; DWARF4-NEXT: 0x00000010 29; DWARF4-NEXT: 0x00000018 30; DWARF4-NEXT: ] 31 32; DWARF5: .debug_info contents: 33; DWARF5: Compile Unit:{{.*}}version = 0x0005 34; DWARF5-NOT: Compile Unit 35; DWARF5: DW_TAG_skeleton_unit 36; DWARF5-NOT: DW_TAG_{{.*}} 37; DWARF5: DW_AT_dwo_name{{.*}}test.dwo 38; DWARF5: DW_AT_addr_base{{.*}}0x00000008 39; DWARF5: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000000) address = 0x0000000000000000 ".text") 40; DWARF5: DW_AT_call_return_pc [DW_FORM_addrx] (indexed (00000002) address = 0x0000000000000018 ".text") 41; DWARF5: .debug_addr contents: 42; DWARF5-NEXT: 0x00000000: Addr Section: length = 0x00000010, version = 0x0005, addr_size = 0x04, seg_size = 0x00 43; DWARF5-NEXT: Addrs: [ 44; DWARF5-NEXT: 0x00000000 45; DWARF5-NEXT: 0x00000010 46; DWARF5-NEXT: 0x00000018 47; DWARF5-NEXT: ] 48 49; ModuleID = './test.c' 50source_filename = "./test.c" 51target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128" 52target triple = "i386-unknown-linux-gnu" 53 54; Function Attrs: noinline nounwind optnone 55define void @foo() #0 !dbg !8 { 56entry: 57 ret void, !dbg !12 58} 59 60; Function Attrs: noinline nounwind optnone 61define void @bar() #0 !dbg !13 { 62entry: 63 call void @foo(), !dbg !14 64 ret void, !dbg !14 65} 66 67attributes #0 = { noinline nounwind optnone } 68 69!llvm.dbg.cu = !{!0} 70!llvm.module.flags = !{!3, !4, !5, !6} 71!llvm.ident = !{!7} 72 73!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 6.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) 74!1 = !DIFile(filename: "test.c", directory: "/tmp") 75!2 = !{} 76!3 = !{i32 1, !"NumRegisterParameters", i32 0} 77!4 = !{i32 2, !"Dwarf Version", i32 5} 78!5 = !{i32 2, !"Debug Info Version", i32 3} 79!6 = !{i32 1, !"wchar_size", i32 4} 80!7 = !{!"clang version 6.0.1"} 81!8 = distinct !DISubprogram(name: "foo", scope: !9, file: !9, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0) 82!9 = !DIFile(filename: "./test.c", directory: "/tmp") 83!10 = !DISubroutineType(types: !11) 84!11 = !{null} 85!12 = !DILocation(line: 2, column: 3, scope: !8) 86!13 = distinct !DISubprogram(name: "bar", scope: !9, file: !9, line: 5, type: !10, isLocal: false, isDefinition: true, flags: DIFlagAllCallsDescribed, scopeLine: 5, isOptimized: false, unit: !0) 87!14 = !DILocation(line: 6, column: 3, scope: !13) 88