@@ -32,6 +32,7 @@ sil [ossa] @getOwnedC : $@convention(thin) () -> (@owned C)
3232sil [ossa] @takeOwnedC : $@convention(thin) (@owned C) -> ()
3333sil [ossa] @takeOwnedCTwice : $@convention(thin) (@owned C, @owned C) -> ()
3434sil [ossa] @takeGuaranteedC : $@convention(thin) (@guaranteed C) -> ()
35+ sil [ossa] @takeGuaranteedAnyObject : $@convention(thin) (@guaranteed AnyObject) -> ()
3536
3637// -O ignores this because there's no copy_value
3738// -Onone hoists the destroy and adds a poison flag.
342343 br bb1
343344
344345bb1:
346+ %f2 = function_ref @takeGuaranteedAnyObject : $@convention(thin) (@guaranteed AnyObject) -> ()
347+ %call = apply %f2(%obj) : $@convention(thin) (@guaranteed AnyObject) -> ()
345348 destroy_value %copy : $AnyObject
346349 destroy_value %obj : $AnyObject
347350 destroy_value %box : ${ var AnyObject }
392395 br bb2
393396
394397bb2:
398+ %f2 = function_ref @takeGuaranteedAnyObject : $@convention(thin) (@guaranteed AnyObject) -> ()
399+ %call = apply %f2(%obj) : $@convention(thin) (@guaranteed AnyObject) -> ()
395400 destroy_value %copy : $AnyObject
396401 destroy_value %obj : $AnyObject
397402 destroy_value %box : ${ var AnyObject }
435440 br bb1
436441
437442bb1:
443+ %f2 = function_ref @takeGuaranteedAnyObject : $@convention(thin) (@guaranteed AnyObject) -> ()
444+ %call = apply %f2(%obj) : $@convention(thin) (@guaranteed AnyObject) -> ()
438445 destroy_value %copy : $AnyObject
439446 destroy_value %obj : $AnyObject
440447 destroy_value %box : ${ var AnyObject }
484491 br bb2
485492
486493bb2:
494+ %f2 = function_ref @takeGuaranteedAnyObject : $@convention(thin) (@guaranteed AnyObject) -> ()
495+ %call = apply %f2(%obj) : $@convention(thin) (@guaranteed AnyObject) -> ()
487496 destroy_value %copy : $AnyObject
488497 destroy_value %obj : $AnyObject
489498 destroy_value %box : ${ var AnyObject }
527536 br bb1
528537
529538bb1:
539+ %f2 = function_ref @takeGuaranteedAnyObject : $@convention(thin) (@guaranteed AnyObject) -> ()
540+ %call = apply %f2(%obj) : $@convention(thin) (@guaranteed AnyObject) -> ()
530541 destroy_value %copy : $AnyObject
531542 destroy_value %obj : $AnyObject
532543 destroy_value %box : ${ var AnyObject }
577588 br bb2
578589
579590bb2:
591+ %f2 = function_ref @takeGuaranteedAnyObject : $@convention(thin) (@guaranteed AnyObject) -> ()
592+ %call = apply %f2(%obj) : $@convention(thin) (@guaranteed AnyObject) -> ()
580593 destroy_value %copy : $AnyObject
581594 destroy_value %obj : $AnyObject
582595 destroy_value %box : ${ var AnyObject }
622635 br bb1
623636
624637bb1:
638+ %f2 = function_ref @takeGuaranteedAnyObject : $@convention(thin) (@guaranteed AnyObject) -> ()
639+ %call = apply %f2(%obj) : $@convention(thin) (@guaranteed AnyObject) -> ()
625640 destroy_value %obj : $AnyObject
626641 destroy_value %box : ${ var AnyObject }
627642 %v = tuple ()
0 commit comments