Commit Graph

3 Commits

Author SHA1 Message Date
Slava Pestov
3a59e7c53a SIL: Serialize availability with the SIL function, not just a weak imported flag
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>.
2019-09-06 20:08:40 -04:00
Saleem Abdulrasool
df9d6d8c7f test: disable SILGen test
This does not make sense on PE/COFF targets where the `_weakLinked`
attribute is unsupported.
2019-03-03 09:38:45 -08:00
Slava Pestov
add0c24727 SILGen: Add missing weak_linked_attribute.swift test
I meant to check this in a while ago; it was part of
https://github.com/apple/swift/pull/22834.
2019-03-02 00:18:45 -05:00