DebugInfo: Simplify debug-macinfo-split-dwarf.ll

This test didn't need any local variables or parameters, and didn't need
to be checking the DWO ID or more detailed forms.

It was using -v to print the macro sections, but now that macro sections
are emitted when requested (-debug-macro) that's not needed either.
This commit is contained in:
David Blaikie 2020-01-31 13:00:39 -08:00
parent 42d4a55f22
commit dce2193358
1 changed files with 9 additions and 17 deletions

View File

@ -1,9 +1,11 @@
; RUN: %llc_dwarf -O0 -split-dwarf-file=foo.dwo -filetype=obj < %s | llvm-dwarfdump -v - | FileCheck %s
; RUN: %llc_dwarf -O0 -split-dwarf-file=foo.dwo -filetype=obj < %s | llvm-dwarfdump --debug-info --debug-macro - | FileCheck %s
; CHECK-LABEL:.debug_info.dwo contents:
; CHECK: DW_AT_GNU_dwo_name [DW_FORM_GNU_str_index] (indexed (00000006) string = "foo.dwo")
; CHECK-NEXT: DW_AT_GNU_dwo_id [DW_FORM_data8] (0xe0f109905cbe1fe4)
; CHECK-NEXT: DW_AT_macro_info [DW_FORM_sec_offset] (0x00000000)
; CHECK:.debug_info.dwo contents:
; CHECK: DW_TAG_compile_unit
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_GNU_dwo_name ("foo.dwo")
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_macro_info (0x00000000)
;CHECK-LABEL:.debug_macinfo.dwo contents:
;CHECK-NEXT: DW_MACINFO_start_file - lineno: 0 filenum: 1
@ -27,15 +29,8 @@ source_filename = "debug-macro-split-dwarf.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @foo(i32 %a, i32 %b) #0 !dbg !25 {
define dso_local void @foo() #0 !dbg !25 {
entry:
%a.addr = alloca i32, align 4
%b.addr = alloca i32, align 4
store i32 %a, i32* %a.addr, align 4
call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !29, metadata !DIExpression()), !dbg !30
store i32 %b, i32* %b.addr, align 4
call void @llvm.dbg.declare(metadata i32* %b.addr, metadata !31, metadata !DIExpression()), !dbg !32
store i32 26, i32* %a.addr, align 4, !dbg !33
ret void, !dbg !34
}
; Function Attrs: nounwind readnone speculatable willreturn
@ -75,11 +70,8 @@ attributes #1 = { nounwind readnone speculatable willreturn }
!24 = !{!"clang version 10.0.0 "}
!25 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 4, type: !26, scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2)
!26 = !DISubroutineType(types: !27)
!27 = !{null, !28, !28}
!28 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!29 = !DILocalVariable(name: "a", arg: 1, scope: !25, file: !1, line: 4, type: !28)
!27 = !{null}
!30 = !DILocation(line: 4, column: 14, scope: !25)
!31 = !DILocalVariable(name: "b", arg: 2, scope: !25, file: !1, line: 4, type: !28)
!32 = !DILocation(line: 4, column: 21, scope: !25)
!33 = !DILocation(line: 5, column: 4, scope: !25)
!34 = !DILocation(line: 6, column: 1, scope: !25)