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 1
1
public func fn( ) { }
2
2
3
+ @usableFromInline
4
+ func usableFromInlineFn( ) { }
5
+
6
+ @_alwaysEmitIntoClient
7
+ public func alwaysEmitIntoClientFn( ) {
8
+ usableFromInlineFn ( )
9
+ }
10
+
3
11
public var globalStored = 0
4
12
5
13
public var globalComputed : Int {
Original file line number Diff line number Diff line change @@ -157,3 +157,12 @@ protocol RefinesP: BaseP {}
157
157
// CHECK-DAG: @"$s24weaklinked_import_helper1SVAA5BasePAAWP" = extern_weak global i8*
158
158
// CHECK-DAG: @"$s24weaklinked_import_helper1SVMn" = extern_weak global %swift.type_descriptor
159
159
extension 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