mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The weak imported flag is now only set if the attribute is unconditionally weak linked, which is the case when it or one of its parent contexts has a @_weakLinked attribute. To correctly handle weak linking based availability with serialized SIL functions, we need to serialize the actual version tuple when the SIL function was introduced. This is because the deployment target of the client app can be older than the deployment target that the original module was built with. Fixes <rdar://problem/52783668>.
6 lines
243 B
Swift
6 lines
243 B
Swift
// RUN: %target-swift-emit-silgen %s | %FileCheck %s
|
|
// UNSUPPORTED: OS=windows-msvc
|
|
|
|
// CHECK-LABEL: sil [weak_imported] [ossa] @$s21weak_linked_attribute0A8FunctionyyF : $@convention(thin) () -> ()
|
|
@_weakLinked public func weakFunction() {}
|