@@ -16,16 +16,33 @@ return %0 : $Builtin.Int64
16
16
sil @arithmetic : $@convention(thin) (Builtin.Int64) -> (Builtin.Int64) {
17
17
bb0(%0 : $Builtin.Int64):
18
18
// CHECK: call void @llvm.dbg.value(metadata i64 %0, metadata ![[CURRENT_VAR:[0-9]+]], metadata !DIExpression())
19
- debug_value %0 : $Builtin.Int64, var, name "current", type $Int , expr op_fragment:#Int ._value
19
+ debug_value %0 : $Builtin.Int64, var, name "current", type $Int64 , expr op_fragment:#Int64 ._value
20
20
// FIXME: It should work with the fragment, as it should be noop.
21
21
// CHECK: call void @llvm.dbg.value(metadata i64 %0, metadata ![[PREVIOUS_VAR:[0-9]+]], metadata !DIExpression(DW_OP_consts, 1, DW_OP_minus, DW_OP_stack_value))
22
- debug_value %0 : $Builtin.Int64, var, name "previous", type $Int , expr op_consts:1:op_minus //:op_fragment:#Int ._value
22
+ debug_value %0 : $Builtin.Int64, var, name "previous", type $Int64 , expr op_consts:1:op_minus //:op_fragment:#Int64 ._value
23
23
// CHECK: call void @llvm.dbg.value(metadata i64 %0, metadata ![[NEXT_VAR:[0-9]+]], metadata !DIExpression(DW_OP_constu, 12, DW_OP_plus, DW_OP_stack_value))
24
- debug_value %0 : $Builtin.Int64, var, name "next", type $Int , expr op_constu:12:op_plus //:op_fragment:#Int ._value
24
+ debug_value %0 : $Builtin.Int64, var, name "next", type $Int64 , expr op_constu:12:op_plus //:op_fragment:#Int64 ._value
25
25
return %0 : $Builtin.Int64
26
26
}
27
27
28
+ // CHECK-LABEL: define {{.*}} @constant
29
+ sil @constant : $@convention(thin) (Builtin.Int64) -> (Builtin.Int64) {
30
+ bb0(%0 : $Builtin.Int64):
31
+ // CHECK: call void @llvm.dbg.value(metadata i64 42, metadata ![[CONST_VAR:[0-9]+]], metadata !DIExpression(DW_OP_stack_value))
32
+ debug_value undef : $Builtin.Int64, var, name "const", expr op_consts:42
33
+ // CHECK: call void @llvm.dbg.value(metadata i64 3645, metadata ![[CONSTINT_VAR:[0-9]+]], metadata !DIExpression(DW_OP_stack_value))
34
+ debug_value undef : $Builtin.Int64, var, name "constint", type $Int64, expr op_constu:3645:op_fragment:#Int64._value
35
+ // CHECK: call void @llvm.dbg.value(metadata i64 6, metadata ![[CONSTUPLE_VAR:[0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64))
36
+ debug_value undef : $Builtin.Int64, var, name "constuple", type $(Int64, Int64), expr op_consts:6:op_tuple_fragment:$(Int64, Int64):0:op_fragment:#Int64._value
37
+
38
+ return %0 : $Builtin.Int64
39
+ }
40
+
41
+
28
42
// CHECK: ![[JUST_UNDEF_VAR]] = !DILocalVariable(name: "optimizedout"
29
43
// CHECK: ![[CURRENT_VAR]] = !DILocalVariable(name: "current"
30
44
// CHECK: ![[PREVIOUS_VAR]] = !DILocalVariable(name: "previous"
31
45
// CHECK: ![[NEXT_VAR]] = !DILocalVariable(name: "next"
46
+ // CHECK: ![[CONST_VAR]] = !DILocalVariable(name: "const"
47
+ // CHECK: ![[CONSTINT_VAR]] = !DILocalVariable(name: "constint"
48
+ // CHECK: ![[CONSTUPLE_VAR]] = !DILocalVariable(name: "constuple"
0 commit comments