@@ -17,6 +17,10 @@ struct MyStruct {
1717 @_section ( " __TEXT,__mysection " ) @_used func foo( ) { }
1818}
1919
20+ @_section ( " __TEXT,__mysection " )
21+ var functionptr = testit
22+ func testit( _ e: consuming Any ) -> Any { e }
23+
2024// SIL: @_section("__DATA,__mysection") @_hasStorage @_hasInitialValue var g0: Int { get set }
2125// SIL: @_section("__DATA,__mysection") @_hasStorage @_hasInitialValue var g1: (Int, Int) { get set }
2226// SIL: @_section("__DATA,__mysection") @_hasStorage @_hasInitialValue var g2: Bool { get set }
@@ -28,22 +32,23 @@ struct MyStruct {
2832// SIL: @_section("__DATA,__mysection") @_hasStorage @_hasInitialValue static var static0: Int { get set }
2933// SIL: @_section("__TEXT,__mysection") @_used func foo()
3034
31- // SIL: sil private [global_init_once_fn] [perf_constraint] @$s7section2g0_WZ : $@convention(c)
35+ // SIL: sil private [global_init_once_fn] @$s7section2g0_WZ : $@convention(c)
3236// SIL: sil hidden [global_init] @$s7section2g0Sivau : $@convention(thin)
33- // SIL: sil private [global_init_once_fn] [perf_constraint] @$s7section2g1_WZ : $@convention(c)
37+ // SIL: sil private [global_init_once_fn] @$s7section2g1_WZ : $@convention(c)
3438// SIL: sil hidden [global_init] @$s7section2g1Si_Sitvau : $@convention(thin)
35- // SIL: sil private [global_init_once_fn] [perf_constraint] @$s7section2g2_WZ : $@convention(c)
39+ // SIL: sil private [global_init_once_fn] @$s7section2g2_WZ : $@convention(c)
3640// SIL: sil hidden [global_init] @$s7section2g2Sbvau : $@convention(thin)
37- // SIL: sil private [global_init_once_fn] [perf_constraint] @$s7section2g3_WZ : $@convention(c)
41+ // SIL: sil private [global_init_once_fn] @$s7section2g3_WZ : $@convention(c)
3842// SIL: sil [global_init] @$s7section2g3Sbvau : $@convention(thin)
39- // SIL: sil private [global_init_once_fn] [perf_constraint] @$s7section2g4_WZ : $@convention(c)
43+ // SIL: sil private [global_init_once_fn] @$s7section2g4_WZ : $@convention(c)
4044// SIL: sil hidden [global_init] @$s7section2g4SpySiGSgvau : $@convention(thin)
41- // SIL: sil private [global_init_once_fn] [perf_constraint] @$s7section2g5_WZ : $@convention(c)
45+ // SIL: sil private [global_init_once_fn] @$s7section2g5_WZ : $@convention(c)
4246// SIL: sil hidden [global_init] @$s7section2g5SpySiGSgvau : $@convention(thin)
4347// SIL: sil hidden [used] [section "__TEXT,__mysection"] @$s7section3fooyyF : $@convention(thin)
44- // SIL: sil private [global_init_once_fn] [perf_constraint] @$s7section8MyStructV7static0_WZ : $@convention(c)
48+ // SIL: sil private [global_init_once_fn] @$s7section8MyStructV7static0_WZ : $@convention(c)
4549// SIL: sil hidden [global_init] @$s7section8MyStructV7static0Sivau : $@convention(thin)
4650// SIL: sil hidden [used] [section "__TEXT,__mysection"] @$s7section8MyStructV3fooyyF : $@convention(method)
51+ // SIL: sil hidden @$s7section6testityypypnF : $@convention(thin) (@in Any) -> @out Any {
4752
4853// IR: @"$s7section2g0Sivp" = hidden global %TSi <{ {{(i64|i32)}} 1 }>, section "__DATA,__mysection"
4954// IR: @"$s7section2g1Si_Sitvp" = hidden global <{ %TSi, %TSi }> <{ %TSi <{ {{(i64|i32)}} 42 }>, %TSi <{ {{(i64|i32)}} 43 }> }>, section "__DATA,__mysection"
0 commit comments