[llvm] dce2193 - DebugInfo: Simplify debug-macinfo-split-dwarf.ll

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 13:10:18 PST 2020


Author: David Blaikie
Date: 2020-01-31T13:09:58-08:00
New Revision: dce21933589a42054f59a035921ade0bf8671f0f

URL: https://github.com/llvm/llvm-project/commit/dce21933589a42054f59a035921ade0bf8671f0f
DIFF: https://github.com/llvm/llvm-project/commit/dce21933589a42054f59a035921ade0bf8671f0f.diff

LOG: 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.

Added: 
    

Modified: 
    llvm/test/DebugInfo/X86/debug-macinfo-split-dwarf.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/DebugInfo/X86/debug-macinfo-split-dwarf.ll b/llvm/test/DebugInfo/X86/debug-macinfo-split-dwarf.ll
index 7e5be6ce4ac5..e75f138354e9 100644
--- a/llvm/test/DebugInfo/X86/debug-macinfo-split-dwarf.ll
+++ b/llvm/test/DebugInfo/X86/debug-macinfo-split-dwarf.ll
@@ -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)


        


More information about the llvm-commits mailing list