File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -498,3 +498,23 @@ entry(%0: $@thin SwiftStruct.Type, %1: $SwiftClass):
498
498
%closure = partial_apply %fun (%0, %1) : $@convention(thin) (@thin SwiftStruct.Type, @owned SwiftClass) -> ()
499
499
return %closure : $@callee_owned () -> ()
500
500
}
501
+
502
+ sil @afun : $@convention(thin) (Int) -> @error Error
503
+
504
+ // Check that we don't assert on a thin noescape function.
505
+ // CHECK-LABEL: define{{.*}} swiftcc void @convert_thin_test
506
+ // CHECK: call swiftcc void @afun(i64 {{.*}}, %swift.refcounted* swiftself undef
507
+ // CHECK: ret void
508
+ sil @convert_thin_test : $@convention(thin) (Int) -> () {
509
+ bb(%0 : $Int):
510
+ %f = function_ref @afun : $@convention(thin) (Int) -> @error Error
511
+ %c = convert_function %f : $@convention(thin) (Int) -> @error Error to $@convention(thin) @noescape (Int) -> @error Error
512
+ try_apply %c(%0) : $@convention(thin) @noescape (Int) -> @error Error, normal bb2, error bb1
513
+
514
+ bb1(%err: $Error):
515
+ %t = tuple ()
516
+ br bb2(%t: $())
517
+
518
+ bb2(%v : $()):
519
+ return %v : $()
520
+ }
You can’t perform that action at this time.
0 commit comments