blob: 1d2c7beba86f4858cd9bf01dc5245dd68f2ea7a7 [file] [log] [blame]
// RUN: %target-swift-frontend -O -Xllvm -sil-disable-pass=Inliner -emit-sil -primary-file %s | %FileCheck %s
// Check if GlobalOpt generates the getters with the right linkage and the right mangling
struct MyStruct {
static let StaticVar = 10
}
let Global = 27
func testit() -> Int {
return MyStruct.StaticVar + Global
}
_ = testit()
// CHECK: sil hidden @{{.*}}testit
// CHECK: // MyStruct.StaticVar.getter
// CHECK-NEXT: sil private [fragile] @_{{.*}}StaticVar
// CHECK: // Global.getter
// CHECK-NEXT: sil private [fragile] @_{{.*}}Global