brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · 8dafeb3 Raw
68 lines · plain
1# RUN: llc -mtriple=x86_64-pc-linux %s -dwarf-version=5 -start-after=livedebugvalues -filetype=obj -o %t2# RUN: llvm-dwarfdump -v %t | FileCheck %s3#4# CHECK: DW_AT_location {{.*}} (DW_OP_entry_value5#6--- |7  ; ModuleID = 'test.ll'8  source_filename = "test.c"9  target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"10  target triple = "x86_64-unknown-linux-gnu"11  12  ; Function Attrs: noinline nounwind uwtable13  define dso_local void @fn1(ptr %x) local_unnamed_addr !dbg !12 {14  entry:15    call void @llvm.dbg.value(metadata ptr %x, metadata !16, metadata !DIExpression()), !dbg !1816    %0 = ptrtoint ptr %x to i64, !dbg !1817    %y = trunc i64 %0 to i32, !dbg !1818    call void @llvm.dbg.value(metadata i32 %y, metadata !17, metadata !DIExpression()), !dbg !1819    tail call void @fn2(i32 7), !dbg !1820    ret void, !dbg !1821  }22  23  declare !dbg !4 dso_local void @fn2(i32) local_unnamed_addr24  25  ; Function Attrs: nounwind readnone speculatable26  declare void @llvm.dbg.value(metadata, metadata, metadata)27  28  !llvm.dbg.cu = !{!0}29  !llvm.module.flags = !{!8, !9, !10}30  !llvm.ident = !{!11}31  32  !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 9.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, nameTableKind: None)33  !1 = !DIFile(filename: "test.c", directory: "/dir")34  !2 = !{}35  !3 = !{!4}36  !4 = !DISubprogram(name: "fn2", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)37  !5 = !DISubroutineType(types: !6)38  !6 = !{null, !7}39  !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)40  !8 = !{i32 2, !"Dwarf Version", i32 5}41  !9 = !{i32 2, !"Debug Info Version", i32 3}42  !10 = !{i32 1, !"wchar_size", i32 4}43  !11 = !{!"clang version 9.0.0"}44  !12 = distinct !DISubprogram(name: "fn1", scope: !1, file: !1, line: 5, type: !13, scopeLine: 5, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !15)45  !13 = !DISubroutineType(types: !14)46  !14 = !{null, !7, !7}47  !15 = !{!16, !17}48  !16 = !DILocalVariable(name: "x", arg: 1, scope: !12, file: !1, line: 5, type: !7)49  !17 = !DILocalVariable(name: "y", scope: !12, file: !1, line: 5, type: !7)50  !18 = !DILocation(line: 0, scope: !12)51 52...53---54name:            fn155alignment:       1656tracksRegLiveness: true57body:             |58  bb.0.entry:59  liveins: $rdi60    DBG_VALUE $rdi, $noreg, !16, !DIExpression(), debug-location !1861    DBG_VALUE $edi, $noreg, !16, !DIExpression(), debug-location !1862    DBG_VALUE $edi, $noreg, !17, !DIExpression(), debug-location !1863    $edi = KILL renamable $edi, implicit killed $rdi, debug-location !1864    DBG_VALUE $rdi, $noreg, !16, !DIExpression(DW_OP_LLVM_entry_value, 1), debug-location !1865    TAILJMPd64 @fn2, csr_64, implicit $rsp, implicit $ssp, implicit $rsp, implicit $ssp, implicit killed $edi, debug-location !1866 67...68