mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Decls with a package access level are currently set to public SIL linkages. This limits the ability to have more fine-grained control and optimize around resilience and serialization. This PR introduces a separate SIL linkage and FormalLinkage for package decls, pipes them down to IRGen, and updates linkage checks at call sites to include package linkage. Resolves rdar://121409846
16 lines
442 B
Swift
16 lines
442 B
Swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-ir %s -validate-tbd-against-ir=all | %FileCheck %s
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import Foundation
|
|
|
|
public class Foo {
|
|
// CHECK-LABEL: define linkonce_odr hidden swiftcc ptr @"$sSo8NSNumberC5valueABSi_tcfC"
|
|
// CHECK-LABEL: define linkonce_odr hidden swiftcc ptr @"$sSo8NSNumberC5valueABSi_tcfcTO"
|
|
public var bar: NSNumber = NSNumber(value: 1)
|
|
}
|
|
|
|
|
|
|
|
|