1 ; RUN: llc %s -start-after=codegenprepare -stop-before=finalize-isel -o - | FileCheck %s
\r
3 ;; %y is unused and cannot (FIXME: currently) be salvaged. Ensure that the
\r
4 ;; variadic dbg_value using %y becomes undef.
\r
6 ; CHECK: ![[C:[0-9]+]] = !DILocalVariable(name: "c",
\r
7 ; CHECK: DBG_VALUE $noreg, $noreg, ![[C]], !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_stack_value), debug-location
\r
9 target triple = "x86_64-pc-windows-msvc19.16.27034"
\r
10 define dso_local i32 @"?foo@@YAHHH@Z"(i32 %a, i32 %b) local_unnamed_addr !dbg !8 {
\r
14 call void @llvm.dbg.value(metadata !DIArgList(i32 %x, i32 %y), metadata !16, metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus, DW_OP_stack_value)), !dbg !17
\r
18 declare void @llvm.dbg.value(metadata, metadata, metadata)
\r
20 !llvm.dbg.cu = !{!0}
\r
21 !llvm.module.flags = !{!3, !4, !5, !6}
\r
24 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 11.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
\r
25 !1 = !DIFile(filename: "test.cpp", directory: "/")
\r
27 !3 = !{i32 2, !"CodeView", i32 1}
\r
28 !4 = !{i32 2, !"Debug Info Version", i32 3}
\r
29 !5 = !{i32 1, !"wchar_size", i32 2}
\r
30 !6 = !{i32 7, !"PIC Level", i32 2}
\r
31 !7 = !{!"clang version 11.0.0"}
\r
32 !8 = distinct !DISubprogram(name: "foo", linkageName: "?foo@@YAHHH@Z", scope: !9, file: !9, line: 1, type: !10, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !13)
\r
33 !9 = !DIFile(filename: "test.cpp", directory: "/")
\r
34 !10 = !DISubroutineType(types: !11)
\r
35 !11 = !{!12, !12, !12}
\r
36 !12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
\r
37 !13 = !{!14, !15, !16}
\r
38 !14 = !DILocalVariable(name: "a", arg: 1, scope: !8, file: !9, line: 1, type: !12)
\r
39 !15 = !DILocalVariable(name: "b", arg: 2, scope: !8, file: !9, line: 1, type: !12)
\r
40 !16 = !DILocalVariable(name: "c", scope: !8, file: !9, line: 2, type: !12)
\r
41 !17 = !DILocation(line: 0, scope: !8)
\r