mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
I am going to leave in the infrastructure around this just in case. But there is no reason to keep this in the tests themselves. I can always just revert this and I don't think merge conflicts are likely due to previous work I did around the tooling for this.
36 lines
1.3 KiB
Swift
36 lines
1.3 KiB
Swift
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: %build-silgen-test-overlays
|
|
|
|
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -module-name inlineable_attribute_objc -Xllvm -sil-full-demangle -primary-file %s -emit-silgen | %FileCheck %s
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import Foundation
|
|
|
|
public class Horse : NSObject {
|
|
public dynamic func gallop() {}
|
|
}
|
|
|
|
// Make sure we can reference dynamic thunks and curry thunks
|
|
// from inlineable scopes
|
|
|
|
// CHECK-LABEL: sil [serialized] @$S25inlineable_attribute_objc15talkAboutAHorse1hyAA5HorseC_tF : $@convention(thin) (@guaranteed Horse) -> () {
|
|
// CHECK: function_ref @$S25inlineable_attribute_objc5HorseC6gallopyyFTc : $@convention(thin) (@guaranteed Horse) -> @owned @callee_guaranteed () -> ()
|
|
// CHECK: return
|
|
// CHECK: }
|
|
|
|
// CHECK-LABEL: sil shared [serializable] [thunk] @$S25inlineable_attribute_objc5HorseC6gallopyyFTc : $@convention(thin) (@guaranteed Horse) -> @owned @callee_guaranteed () -> ()
|
|
// CHECK: %1 = function_ref @$S25inlineable_attribute_objc5HorseC6gallopyyFTD
|
|
// CHECK: return
|
|
// CHECK: }
|
|
|
|
// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$S25inlineable_attribute_objc5HorseC6gallopyyFTD : $@convention(method) (@guaranteed Horse) -> ()
|
|
// CHECK: objc_method
|
|
// CHECK: return
|
|
// CHECK: }
|
|
|
|
@_inlineable public func talkAboutAHorse(h: Horse) {
|
|
_ = h.gallop
|
|
}
|