mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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>.
11 lines
295 B
Plaintext
11 lines
295 B
Plaintext
// RUN: %swift -target x86_64-unknown-windows-msvc -emit-ir -verify %s
|
|
|
|
sil_stage canonical
|
|
|
|
// expected-error@+1{{attribute 'weak_imported' is unsupported on target 'x86_64-unknown-windows-msvc'}}
|
|
sil [weak_imported] @f : $@convention(thin) () -> () {
|
|
%unit = tuple()
|
|
return %unit : $()
|
|
}
|
|
|