87 lines · plain
1; RUN: llc -split-dwarf-file=test.dwo -dwarf-version=4 %s -mtriple=i386-unknown-linux-gnu -filetype=obj -o - -minimize-addr-in-v5=Disabled | \2; RUN: llvm-dwarfdump -v - | FileCheck %s -check-prefix=DWARF43 4; RUN: llc -split-dwarf-file=test.dwo -dwarf-version=5 %s -mtriple=i386-unknown-linux-gnu -filetype=obj -o - -minimize-addr-in-v5=Disabled | \5; RUN: llvm-dwarfdump -v - | FileCheck %s -check-prefix=DWARF56 7; Source:8; void foo() {9; }10;11; void bar() {12; foo();13; }14 15; DWARF4: .debug_info contents:16; DWARF4: Compile Unit:{{.*}}version = 0x000417; DWARF4-NOT: Compile Unit18; DWARF4: DW_TAG_compile_unit19; DWARF4-NOT: DW_TAG_{{.*}}20; DWARF4: DW_AT_GNU_dwo_name{{.*}}test.dwo21; DWARF4: DW_AT_GNU_addr_base{{.*}}0x0000000022; DWARF4: DW_TAG_GNU_call_site23; DWARF4: DW_AT_low_pc [DW_FORM_GNU_addr_index] (indexed (00000002) address = 0x00000018 ".text")24; DWARF4: .debug_addr contents:25; DWARF4-NEXT: Addrs: [26; DWARF4-NEXT: 0x0000000027; DWARF4-NEXT: 0x0000001028; DWARF4-NEXT: 0x0000001829; DWARF4-NEXT: ]30 31; DWARF5: .debug_info contents:32; DWARF5: Compile Unit:{{.*}}version = 0x000533; DWARF5-NOT: Compile Unit34; DWARF5: DW_TAG_skeleton_unit35; DWARF5-NOT: DW_TAG_{{.*}}36; DWARF5: DW_AT_dwo_name{{.*}}test.dwo37; DWARF5: DW_AT_addr_base{{.*}}0x0000000838; DWARF5: DW_AT_low_pc [DW_FORM_addrx] (indexed (00000000) address = 0x00000000 ".text")39; DWARF5: DW_AT_call_return_pc [DW_FORM_addrx] (indexed (00000002) address = 0x00000018 ".text")40; DWARF5: .debug_addr contents:41; DWARF5-NEXT: 0x00000000: Address table header: length = 0x00000010, format = DWARF32, version = 0x0005, addr_size = 0x04, seg_size = 0x0042; DWARF5-NEXT: Addrs: [43; DWARF5-NEXT: 0x0000000044; DWARF5-NEXT: 0x0000001045; DWARF5-NEXT: 0x0000001846; DWARF5-NEXT: ]47 48; ModuleID = './test.c'49source_filename = "./test.c"50target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"51target triple = "i386-unknown-linux-gnu"52 53; Function Attrs: noinline nounwind optnone54define void @foo() #0 !dbg !8 {55entry:56 ret void, !dbg !1257}58 59; Function Attrs: noinline nounwind optnone60define void @bar() #0 !dbg !13 {61entry:62 call void @foo(), !dbg !1463 ret void, !dbg !1464}65 66attributes #0 = { noinline nounwind optnone }67 68!llvm.dbg.cu = !{!0}69!llvm.module.flags = !{!3, !4, !5, !6}70!llvm.ident = !{!7}71 72!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 6.0.1", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)73!1 = !DIFile(filename: "test.c", directory: "/tmp")74!2 = !{}75!3 = !{i32 1, !"NumRegisterParameters", i32 0}76!4 = !{i32 2, !"Dwarf Version", i32 5}77!5 = !{i32 2, !"Debug Info Version", i32 3}78!6 = !{i32 1, !"wchar_size", i32 4}79!7 = !{!"clang version 6.0.1"}80!8 = distinct !DISubprogram(name: "foo", scope: !9, file: !9, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0)81!9 = !DIFile(filename: "./test.c", directory: "/tmp")82!10 = !DISubroutineType(types: !11)83!11 = !{null}84!12 = !DILocation(line: 2, column: 3, scope: !8)85!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)86!14 = !DILocation(line: 6, column: 3, scope: !13)87