1 ; RUN: llc -stop-after=livedebugvalues < %s | FileCheck %s 2 ; 3 ; ModuleID = 'dbg-value-i16.ll' 4 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" 5 target triple = "aarch64" 6 7 ; CHECK: DBG_VALUE 8 ; Function Attrs: nounwind 9 define void @f() #0 !dbg !4 { 10 entry: 11 tail call void @h(i16 0) #2, !dbg !14 12 %call = tail call i16 (...) @g() #2, !dbg !15 13 tail call void @llvm.dbg.value(metadata i16 %call, metadata !8, metadata !16), !dbg !17 14 tail call void @h(i16 %call) #2, !dbg !18 15 ret void, !dbg !19 16 } 17 18 declare void @h(i16) 19 20 declare i16 @g(...) 21 22 ; Function Attrs: nounwind readnone 23 declare void @llvm.dbg.value(metadata, metadata, metadata) #1 24 25 attributes #0 = { nounwind } 26 attributes #1 = { nounwind readnone } 27 attributes #2 = { nounwind } 28 29 !llvm.dbg.cu = !{!0} 30 !llvm.module.flags = !{!10, !11, !12} 31 !llvm.ident = !{!13} 32 33 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2) 34 !1 = !DIFile(filename: "test.c", directory: "/Volumes/Data/llvm") 35 !2 = !{} 36 !4 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: true, unit: !0, retainedNodes: !7) 37 !5 = !DISubroutineType(types: !6) 38 !6 = !{null} 39 !7 = !{!8} 40 !8 = !DILocalVariable(name: "a", scope: !4, file: !1, line: 5, type: !9) 41 !9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) 42 !10 = !{i32 2, !"Dwarf Version", i32 2} 43 !11 = !{i32 2, !"Debug Info Version", i32 3} 44 !12 = !{i32 1, !"PIC Level", i32 2} 45 !13 = !{!"clang version 3.9.0 "} 46 !14 = !DILocation(line: 4, column: 3, scope: !4) 47 !15 = !DILocation(line: 5, column: 11, scope: !4) 48 !16 = !DIExpression() 49 !17 = !DILocation(line: 5, column: 7, scope: !4) 50 !18 = !DILocation(line: 6, column: 3, scope: !4) 51 !19 = !DILocation(line: 7, column: 1, scope: !4) 52