File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 11public func fn( ) { }
22
3+ @usableFromInline
4+ func usableFromInlineFn( ) { }
5+
6+ @_alwaysEmitIntoClient
7+ public func alwaysEmitIntoClientFn( ) {
8+ usableFromInlineFn ( )
9+ }
10+
311public var globalStored = 0
412
513public var globalComputed : Int {
Original file line number Diff line number Diff line change @@ -157,3 +157,12 @@ protocol RefinesP: BaseP {}
157157// CHECK-DAG: @"$s24weaklinked_import_helper1SVAA5BasePAAWP" = extern_weak global i8*
158158// CHECK-DAG: @"$s24weaklinked_import_helper1SVMn" = extern_weak global %swift.type_descriptor
159159extension S : RefinesP { }
160+
161+ func testInlining( ) {
162+ // FIXME: usableFromInlineFn() should be extern_weak but isn't because
163+ // inlining doesn't respect @_weakLinked import yet.
164+
165+ // CHECK-DAG: define linkonce_odr hidden {{.+}} @"$s24weaklinked_import_helper22alwaysEmitIntoClientFnyyF"()
166+ // CHECK-DAG: declare swiftcc {{.+}} @"$s24weaklinked_import_helper18usableFromInlineFnyyF"
167+ alwaysEmitIntoClientFn ( )
168+ }
You can’t perform that action at this time.
0 commit comments