Files
swift-mirror/test/SILGen/weak_linked_attribute.swift
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

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() {}