@@ -20,7 +20,7 @@ func test_returns_cgfloat(_: Double) -> CGFloat {
2020let d : Double = 0.0
2121let cgf : CGFloat = 0.0
2222
23- // CHECK: test_various_situations_converting_to_cgfloat()
23+ // CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion038test_various_situations_converting_to_C0yyF : $@convention(thin) () -> () {
2424func test_various_situations_converting_to_cgfloat( ) {
2525 // CHECK: function_ref @$s12CoreGraphics7CGFloatVyACSdcfC : $@convention(method) (Double, @thin CGFloat.Type) -> CGFloat
2626 let _: CGFloat = d
@@ -58,6 +58,7 @@ func test_various_situations_converting_to_cgfloat() {
5858 test_to_cgfloat ( test_returns_double ( d) ) // Two conversions
5959
6060 // Overloads with CGFloat are preferred if that allows to avoid any implicit conversions.
61+ // CHECK-LABEL: sil private [ossa] @$s34implicit_double_cgfloat_conversion038test_various_situations_converting_to_C0yyF0E23_loading_tuple_elementsL_6valuesy12CoreGraphics7CGFloatV_AGtz_tF : $@convention(thin) (@inout (CGFloat, CGFloat)) -> () {
6162 func test_loading_tuple_elements( values: inout ( CGFloat , CGFloat ) ) {
6263 struct S {
6364 init ( x: Double , y: Double ) { }
@@ -69,7 +70,7 @@ func test_various_situations_converting_to_cgfloat() {
6970 }
7071}
7172
72- // CHECK: test_various_situations_converting_to_double()
73+ // CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion038test_various_situations_converting_to_B0yyF : $@convention(thin) () -> () {
7374func test_various_situations_converting_to_double( ) {
7475 // function_ref @$sSd12CoreGraphicsEySdAA7CGFloatVcfC : $@convention(method) (CGFloat, @thin Double.Type) -> Double
7576 let _: Double = cgf
@@ -102,12 +103,14 @@ func test_various_situations_converting_to_double() {
102103 test_from_cgfloat ( test_returns_cgfloat ( cgf) ) // Two conversions - argument and result.
103104}
104105
106+ // CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion31test_conversions_with_optionals1vy12CoreGraphics7CGFloatVSg_tF : $@convention(thin) (Optional<CGFloat>) -> () {
105107func test_conversions_with_optionals( v: CGFloat ? ) {
106108 // CHECK: function_ref @$s34implicit_double_cgfloat_conversion31test_conversions_with_optionals1vy12CoreGraphics7CGFloatVSg_tFAFyKXEfu_
107109 // CHECK: function_ref @$sSd12CoreGraphicsEySdAA7CGFloatVcfC : $@convention(method) (CGFloat, @thin Double.Type) -> Double
108110 let _: Double = ( v ?? 0 )
109111}
110112
113+ // CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion48test_static_members_are_contextually_convertibleyyF : $@convention(thin) () -> () {
111114func test_static_members_are_contextually_convertible( ) {
112115 struct S {
113116 static var testProp : CGFloat { 42 }
@@ -125,6 +128,7 @@ func test_static_members_are_contextually_convertible() {
125128 }
126129}
127130
131+ // CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion25test_narrowing_is_delayed1x1yySd_12CoreGraphics7CGFloatVtF : $@convention(thin) (Double, CGFloat) -> () {
128132func test_narrowing_is_delayed( x: Double , y: CGFloat ) {
129133 func test( _: CGFloat ) { }
130134
@@ -181,6 +185,7 @@ extension CGFloat {
181185}
182186
183187// Make sure that solution with no Double/CGFloat conversions is preferred
188+ // CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion38test_no_ambiguity_with_unary_operators5width6heighty12CoreGraphics7CGFloatV_AGtF : $@convention(thin) (CGFloat, CGFloat) -> () {
184189func test_no_ambiguity_with_unary_operators( width: CGFloat , height: CGFloat ) {
185190 struct R {
186191 init ( x: CGFloat , y: CGFloat , width: CGFloat , height: CGFloat ) { }
@@ -193,6 +198,7 @@ func test_no_ambiguity_with_unary_operators(width: CGFloat, height: CGFloat) {
193198 _ = R ( x: width / 4 , y: - height / 2 , width: width, height: height)
194199}
195200
201+ // CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion40test_conversions_with_optional_promotion1d3cgfySd_12CoreGraphics7CGFloatVtF : $@convention(thin) (Double, CGFloat) -> () {
196202func test_conversions_with_optional_promotion( d: Double , cgf: CGFloat ) {
197203 func test_double( _: Double ? ? , _: Double ? ? ? ) { }
198204 func test_cgfloat( _: CGFloat ? ? , _: CGFloat ? ? ? ) { }
@@ -332,6 +338,7 @@ func test_implicit_conversion_clash_with_partial_application_check() {
332338}
333339
334340// rdar://99352676
341+ // CHECK-LABEL: sil hidden [ossa] @$s34implicit_double_cgfloat_conversion20test_init_validationyyF : $@convention(thin) () -> () {
335342func test_init_validation( ) {
336343 class Foo {
337344 static let bar = 100.0
0 commit comments