@@ -720,104 +720,6 @@ bb2:
720
720
%33 = return %32 : $()
721
721
}
722
722
723
- // CHECK-LABEL: sil @cse_value_metatype
724
- // CHECK: value_metatype $@objc_metatype
725
- // CHECK: objc_metatype_to_object
726
- // CHECK-NOT: value_metatype $@objc_metatype
727
- // CHECK: strong_release
728
- // CHECK: return
729
- sil @cse_value_metatype : $@convention(thin) <T where T : AnyObject> (@owned T) -> @owned (AnyObject, AnyObject) {
730
- bb0(%0 : $T):
731
- %2 = value_metatype $@objc_metatype T.Type, %0 : $T
732
- %4 = objc_metatype_to_object %2 : $@objc_metatype T.Type to $AnyObject
733
- %5 = value_metatype $@objc_metatype T.Type, %0 : $T
734
- %7 = objc_metatype_to_object %5 : $@objc_metatype T.Type to $AnyObject
735
- strong_release %0 : $T
736
- %9 = tuple (%4: $AnyObject, %7: $AnyObject)
737
- return %9 : $(AnyObject, AnyObject)
738
- }
739
-
740
-
741
- @objc(XX) protocol XX {
742
- }
743
-
744
- // CHECK-LABEL: sil @cse_existential_metatype
745
- // CHECK: existential_metatype $@objc_metatype
746
- // CHECK: objc_existential_metatype_to_object
747
- // CHECK-NOT: existential_metatype $@objc_metatype
748
- // CHECK: strong_release
749
- // CHECK: return
750
- sil @cse_existential_metatype : $@convention(thin) (@owned XX) -> @owned (AnyObject, AnyObject) {
751
- bb0(%0 : $XX):
752
- %2 = existential_metatype $@objc_metatype XX.Type, %0 : $XX
753
- %4 = objc_existential_metatype_to_object %2 : $@objc_metatype XX.Type to $AnyObject
754
- %5 = existential_metatype $@objc_metatype XX.Type, %0 : $XX
755
- %6 = objc_existential_metatype_to_object %5 : $@objc_metatype XX.Type to $AnyObject
756
- strong_release %0 : $XX
757
- %7 = tuple (%4: $AnyObject, %6: $AnyObject)
758
- return %7 : $(AnyObject, AnyObject)
759
- }
760
-
761
- // CHECK-LABEL: sil @nocse_existential_metatype_addr
762
- // CHECK: store
763
- // CHECK: existential_metatype $@thick Any.Type
764
- // CHECK: store
765
- // CHECK: existential_metatype $@thick Any.Type
766
- // CHECK: return
767
- sil @nocse_existential_metatype_addr : $@convention(thin) (@owned B, @owned B) -> (@thick Any.Type, @thick Any.Type) {
768
- bb0(%0 : $B, %1 : $B):
769
- %2 = alloc_stack $Any
770
- %3 = init_existential_addr %2 : $*Any, $B
771
- store %0 to %3 : $*B
772
- %5 = existential_metatype $@thick Any.Type, %2 : $*Any
773
- store %1 to %3 : $*B
774
- %7 = existential_metatype $@thick Any.Type, %2 : $*Any
775
- strong_release %1 : $B
776
- strong_release %0 : $B
777
- %99 = tuple (%5 : $@thick Any.Type, %7 : $@thick Any.Type)
778
- dealloc_stack %2 : $*Any
779
- return %99 : $(@thick Any.Type, @thick Any.Type)
780
- }
781
-
782
-
783
- // CHECK-LABEL: sil @cse_objc_metatype_to_object
784
- // CHECK: value_metatype $@objc_metatype
785
- // CHECK: objc_metatype_to_object
786
- // CHECK-NOT: value_metatype $@objc_metatype
787
- // CHECK-NOT: objc_metatype_to_object
788
- // CHECK: strong_release
789
- // CHECK: return
790
- sil @cse_objc_metatype_to_object : $@convention(thin) <T where T : AnyObject> (@owned T) -> @owned (AnyObject, AnyObject) {
791
- bb0(%0 : $T):
792
- %2 = value_metatype $@objc_metatype T.Type, %0 : $T
793
- %4 = objc_metatype_to_object %2 : $@objc_metatype T.Type to $AnyObject
794
- %5 = value_metatype $@objc_metatype T.Type, %0 : $T
795
- %7 = objc_metatype_to_object %5 : $@objc_metatype T.Type to $AnyObject
796
- strong_release %0 : $T
797
- %9 = tuple (%4: $AnyObject, %7: $AnyObject)
798
- return %9 : $(AnyObject, AnyObject)
799
- }
800
-
801
-
802
- // CHECK-LABEL: sil @cse_objc_existential_metatype_to_object
803
- // CHECK: existential_metatype $@objc_metatype
804
- // CHECK: objc_existential_metatype_to_object
805
- // CHECK-NOT: existential_metatype $@objc_metatype
806
- // CHECK-NOT: objc_existential_metatype_to_object
807
- // CHECK: strong_release
808
- // CHECK: return
809
- sil @cse_objc_existential_metatype_to_object : $@convention(thin) (@owned XX) -> @owned (AnyObject, AnyObject) {
810
- bb0(%0 : $XX):
811
- %2 = existential_metatype $@objc_metatype XX.Type, %0 : $XX
812
- %4 = objc_existential_metatype_to_object %2 : $@objc_metatype XX.Type to $AnyObject
813
- %5 = existential_metatype $@objc_metatype XX.Type, %0 : $XX
814
- %6 = objc_existential_metatype_to_object %5 : $@objc_metatype XX.Type to $AnyObject
815
- strong_release %0 : $XX
816
- %7 = tuple (%4: $AnyObject, %6: $AnyObject)
817
- return %7 : $(AnyObject, AnyObject)
818
- }
819
-
820
-
821
723
// CHECK-LABEL: sil @cse_raw_pointer_to_ref
822
724
// CHECK: raw_pointer_to_ref
823
725
// CHECK-NOT: raw_pointer_to_ref
@@ -937,24 +839,6 @@ bb0(%0 : $Enum1):
937
839
return %3: $(Builtin.Int1, Builtin.Int1)
938
840
}
939
841
940
-
941
- @objc
942
- class XXX {
943
- }
944
-
945
- // CHECK-LABEL: sil @cse_objc_to_thick_metatype
946
- // CHECK: objc_to_thick_metatype
947
- // CHECK-NOT: objc_to_thick_metatype
948
- // CHECK: tuple
949
- // CHECK: return
950
- sil @cse_objc_to_thick_metatype : $@convention(thin) (@objc_metatype XXX.Type) -> (@thick XXX.Type, @thick XXX.Type) {
951
- bb0(%0 : $@objc_metatype XXX.Type):
952
- %1 = objc_to_thick_metatype %0 : $@objc_metatype XXX.Type to $@thick XXX.Type
953
- %2 = objc_to_thick_metatype %0 : $@objc_metatype XXX.Type to $@thick XXX.Type
954
- %3 = tuple (%1: $@thick XXX.Type, %2: $@thick XXX.Type)
955
- return %3: $(@thick XXX.Type, @thick XXX.Type)
956
- }
957
-
958
842
// CHECK-LABEL: sil @cse_bridge_object_to_ref
959
843
// CHECK: bridge_object_to_ref
960
844
// CHECK-NOT: bridge_object_to_ref
0 commit comments