File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -628,7 +628,8 @@ SILValue VariableNameInferrer::findDebugInfoProvidingValueHelper(
628
628
isa<MoveOnlyWrapperToCopyableValueInst>(searchValue) ||
629
629
isa<CopyableToMoveOnlyWrapperValueInst>(searchValue) ||
630
630
isa<EndInitLetRefInst>(searchValue) ||
631
- isa<ConvertEscapeToNoEscapeInst>(searchValue)) {
631
+ isa<ConvertEscapeToNoEscapeInst>(searchValue) ||
632
+ isa<ConvertFunctionInst>(searchValue)) {
632
633
searchValue = cast<SingleValueInstruction>(searchValue)->getOperand (0 );
633
634
continue ;
634
635
}
Original file line number Diff line number Diff line change @@ -919,3 +919,21 @@ bb0:
919
919
%9999 = tuple ()
920
920
return %9999 : $()
921
921
}
922
+
923
+ // CHECK-LABEL: begin running test 1 of 1 on infer_through_convert_function: variable_name_inference with: @trace[0]
924
+ // CHECK: Input Value: // function_ref sideEffect
925
+ // CHECK-NEXT: %0 = function_ref @sideEffect
926
+ // CHECK: Name: 'closure'
927
+ // CHECK: Root: // function_ref sideEffect
928
+ // CHECK-NEXT: %0 = function_ref @sideEffect
929
+ // CHECK: end running test 1 of 1 on infer_through_convert_function: variable_name_inference with: @trace[0]
930
+ sil [ossa] @infer_through_convert_function : $@convention(thin) () -> () {
931
+ bb0:
932
+ specify_test "variable_name_inference @trace[0]"
933
+ %0 = function_ref @sideEffect : $@convention(thin) () -> ()
934
+ debug_value %0 : $@convention(thin) () -> (), let, name "closure"
935
+ %1 = convert_function %0 : $@convention(thin) () -> () to $@convention(thin) () -> ()
936
+ debug_value [trace] %0 : $@convention(thin) () -> ()
937
+ %9999 = tuple ()
938
+ return %9999 : $()
939
+ }
You can’t perform that action at this time.
0 commit comments