Skip to content

Commit

Permalink
Annotate thunks with the [thunk] attribute during SILGen.
Browse files Browse the repository at this point in the history
Swift generates two entry points to @objc methods where one of
them is a thunk, and the inliner happily inlines the swift code
into the @objc thunk, effectively doubling the code size of some
@objc classes.

The performance inliner already knows not to inline large functions
into callers that are marked as thunks. This commit adds the [thunk]
attribute to the @objc thunks in an attempt to reduce code size.

rdar://22403108

Swift SVN r31498
  • Loading branch information
nadavrot committed Aug 26, 2015
1 parent 19f761d commit 8b725a9
Show file tree
Hide file tree
Showing 22 changed files with 129 additions and 124 deletions.
5 changes: 5 additions & 0 deletions lib/SILGen/SILGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ void SILGenModule::emitObjCMethodThunk(FuncDecl *method) {
preEmitFunction(thunk, method, f, method);
PrettyStackTraceSILFunction X("silgen emitObjCMethodThunk", f);
f->setBare(IsBare);
f->setThunk(IsThunk);
SILGenFunction(*this, *f).emitNativeToForeignThunk(thunk);
postEmitFunction(thunk, f);
}
Expand Down Expand Up @@ -810,6 +811,7 @@ void SILGenModule::emitObjCPropertyMethodThunks(AbstractStorageDecl *prop) {
preEmitFunction(getter, prop, f, ThunkBodyLoc);
PrettyStackTraceSILFunction X("silgen objc property getter thunk", f);
f->setBare(IsBare);
f->setThunk(IsThunk);
SILGenFunction(*this, *f).emitNativeToForeignThunk(getter);
postEmitFunction(getter, f);
}
Expand All @@ -827,6 +829,7 @@ void SILGenModule::emitObjCPropertyMethodThunks(AbstractStorageDecl *prop) {
preEmitFunction(setter, prop, f, ThunkBodyLoc);
PrettyStackTraceSILFunction X("silgen objc property setter thunk", f);
f->setBare(IsBare);
f->setThunk(IsThunk);
SILGenFunction(*this, *f).emitNativeToForeignThunk(setter);
postEmitFunction(setter, f);
}
Expand All @@ -848,6 +851,7 @@ void SILGenModule::emitObjCConstructorThunk(ConstructorDecl *constructor) {
preEmitFunction(thunk, constructor, f, constructor);
PrettyStackTraceSILFunction X("silgen objc constructor thunk", f);
f->setBare(IsBare);
f->setThunk(IsThunk);
SILGenFunction(*this, *f).emitNativeToForeignThunk(thunk);
postEmitFunction(thunk, f);
}
Expand All @@ -866,6 +870,7 @@ void SILGenModule::emitObjCDestructorThunk(DestructorDecl *destructor) {
preEmitFunction(thunk, destructor, f, destructor);
PrettyStackTraceSILFunction X("silgen objc destructor thunk", f);
f->setBare(IsBare);
f->setThunk(IsThunk);
SILGenFunction(*this, *f).emitNativeToForeignThunk(thunk);
postEmitFunction(thunk, f);
}
Expand Down
4 changes: 2 additions & 2 deletions test/ClangModules/optional.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class A {
@objc func foo() -> String? {
return ""
}
// CHECK-LABEL: sil hidden @_TToFC8optional1A3foofS0_FT_GSqSS_ : $@convention(objc_method) (A) -> @autoreleased Optional<NSString>
// CHECK-LABEL: sil hidden [thunk] @_TToFC8optional1A3foofS0_FT_GSqSS_ : $@convention(objc_method) (A) -> @autoreleased Optional<NSString>
// CHECK: [[T0:%.*]] = function_ref @_TFC8optional1A3foofS0_FT_GSqSS_
// CHECK-NEXT: [[T1:%.*]] = apply [[T0]](%0)
// CHECK-NEXT: strong_release
Expand All @@ -31,7 +31,7 @@ class A {
// CHECK-NEXT: autorelease_return [[T0]]

@objc func bar(x x : String?) {}
// CHECK-LABEL: sil hidden @_TToFC8optional1A3barfS0_FT1xGSqSS__T_ : $@convention(objc_method) (Optional<NSString>, A) -> ()
// CHECK-LABEL: sil hidden [thunk] @_TToFC8optional1A3barfS0_FT1xGSqSS__T_ : $@convention(objc_method) (Optional<NSString>, A) -> ()
// CHECK: [[T1:%.*]] = select_enum %0
// CHECK-NEXT: cond_br [[T1]]
// Something branch: project value, translate, inject into result.
Expand Down
2 changes: 1 addition & 1 deletion test/SIL/unimplemented_initializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class DesignatedStubs : Gizmo {
// CHECK-DEBUG: sil hidden @_TFC25unimplemented_initializer15DesignatedStubscfMS0_FT7bellsOnSi_GSQS0__
// CHECK-DEBUG: string_literal utf8 "{{.*}}unimplemented_initializer.swift"

// CHECK-RELEASE: sil hidden @_TFC25unimplemented_initializer15DesignatedStubscfMS0_FT7bellsOnSi_GSQS0__
// CHECK-RELEASE: sil hidden [thunk] @_TFC25unimplemented_initializer15DesignatedStubscfMS0_FT7bellsOnSi_GSQS0__
// CHECK-RELEASE-NOT: unimplemented_initializer.swift"

6 changes: 3 additions & 3 deletions test/SILGen/cf.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,17 @@ extension CCImpedance: ImpedanceType {}
// CHECK-LABEL: sil shared [transparent] @_TFVSC11CCImpedanceg4imagSd

class MyMagnetism : CCMagnetismModel {
// CHECK-LABEL: sil hidden @_TToFC2cf11MyMagnetism15getRefrigeratorfS0_FT_CSo14CCRefrigerator : $@convention(objc_method) (MyMagnetism) -> @autoreleased CCRefrigerator
// CHECK-LABEL: sil hidden [thunk] @_TToFC2cf11MyMagnetism15getRefrigeratorfS0_FT_CSo14CCRefrigerator : $@convention(objc_method) (MyMagnetism) -> @autoreleased CCRefrigerator
override func getRefrigerator() -> CCRefrigerator {
return super.getRefrigerator()
}

// CHECK-LABEL: sil hidden @_TToFC2cf11MyMagnetism16takeRefrigeratorfS0_FT_CSo14CCRefrigerator : $@convention(objc_method) (MyMagnetism) -> @owned CCRefrigerator
// CHECK-LABEL: sil hidden [thunk] @_TToFC2cf11MyMagnetism16takeRefrigeratorfS0_FT_CSo14CCRefrigerator : $@convention(objc_method) (MyMagnetism) -> @owned CCRefrigerator
override func takeRefrigerator() -> CCRefrigerator {
return super.takeRefrigerator()
}

// CHECK-LABEL: sil hidden @_TToFC2cf11MyMagnetism18borrowRefrigeratorfS0_FT_CSo14CCRefrigerator : $@convention(objc_method) (MyMagnetism) -> @autoreleased CCRefrigerator
// CHECK-LABEL: sil hidden [thunk] @_TToFC2cf11MyMagnetism18borrowRefrigeratorfS0_FT_CSo14CCRefrigerator : $@convention(objc_method) (MyMagnetism) -> @autoreleased CCRefrigerator
override func borrowRefrigerator() -> CCRefrigerator {
return super.borrowRefrigerator()
}
Expand Down
24 changes: 12 additions & 12 deletions test/SILGen/dynamic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,25 +63,25 @@ protocol Proto {
// CHECK-LABEL: sil hidden @_TFC7dynamic3FooCfMS0_FT4objcSi_S0_
// CHECK: function_ref @_TFC7dynamic3FoocfMS0_FT4objcSi_S0_

// CHECK-LABEL: sil hidden @_TToFC7dynamic3FoocfMS0_FT4objcSi_S0_
// CHECK-LABEL: sil hidden @_TToFC7dynamic3Foo10objcMethodfS0_FT_T_
// CHECK-LABEL: sil hidden [transparent] @_TToFC7dynamic3Foog8objcPropSi
// CHECK-LABEL: sil hidden [transparent] @_TToFC7dynamic3Foos8objcPropSi
// CHECK-LABEL: sil hidden @_TToFC7dynamic3Foog9subscriptFT4objcPSs9AnyObject__Si
// CHECK-LABEL: sil hidden @_TToFC7dynamic3Foos9subscriptFT4objcPSs9AnyObject__Si
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3FoocfMS0_FT4objcSi_S0_
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foo10objcMethodfS0_FT_T_
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC7dynamic3Foog8objcPropSi
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC7dynamic3Foos8objcPropSi
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foog9subscriptFT4objcPSs9AnyObject__Si
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foos9subscriptFT4objcPSs9AnyObject__Si

// TODO: dynamic initializing ctor must be objc dispatched
// CHECK-LABEL: sil hidden @_TFC7dynamic3FooCfMS0_FT7dynamicSi_S0_
// CHECK: function_ref @_TTDFC7dynamic3FoocfMS0_FT7dynamicSi_S0_
// CHECK-LABEL: sil shared [transparent] @_TTDFC7dynamic3FoocfMS0_FT7dynamicSi_S0_
// CHECK: class_method [volatile] {{%.*}} : $Foo, #Foo.init!initializer.1.foreign :

// CHECK-LABEL: sil hidden @_TToFC7dynamic3FoocfMS0_FT7dynamicSi_S0_
// CHECK-LABEL: sil hidden @_TToFC7dynamic3Foo13dynamicMethodfS0_FT_T_
// CHECK-LABEL: sil hidden [transparent] @_TToFC7dynamic3Foog11dynamicPropSi
// CHECK-LABEL: sil hidden [transparent] @_TToFC7dynamic3Foos11dynamicPropSi
// CHECK-LABEL: sil hidden @_TToFC7dynamic3Foog9subscriptFT7dynamicSi_Si
// CHECK-LABEL: sil hidden @_TToFC7dynamic3Foos9subscriptFT7dynamicSi_Si
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3FoocfMS0_FT7dynamicSi_S0_
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foo13dynamicMethodfS0_FT_T_
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC7dynamic3Foog11dynamicPropSi
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC7dynamic3Foos11dynamicPropSi
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foog9subscriptFT7dynamicSi_Si
// CHECK-LABEL: sil hidden [thunk] @_TToFC7dynamic3Foos9subscriptFT7dynamicSi_Si

// Protocol witnesses use best appropriate dispatch

Expand Down
10 changes: 5 additions & 5 deletions test/SILGen/foreign_errors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extension NSObject {
@objc func abort() throws {
throw NSError(domain: "", code: 1, userInfo: [:])
}
// CHECK-LABEL: sil hidden @_TToFE14foreign_errorsCSo8NSObject5abortfS0_FzT_T_ : $@convention(objc_method) (AutoreleasingUnsafeMutablePointer<Optional<NSError>>, NSObject) -> Bool
// CHECK-LABEL: sil hidden [thunk] @_TToFE14foreign_errorsCSo8NSObject5abortfS0_FzT_T_ : $@convention(objc_method) (AutoreleasingUnsafeMutablePointer<Optional<NSError>>, NSObject) -> Bool
// CHECK: [[T0:%.*]] = function_ref @_TFE14foreign_errorsCSo8NSObject5abortfS0_FzT_T_ : $@convention(method) (@guaranteed NSObject) -> @error ErrorType
// CHECK: try_apply [[T0]](
// CHECK: bb1(
Expand All @@ -78,7 +78,7 @@ extension NSObject {
@objc func badDescription() throws -> String {
throw NSError(domain: "", code: 1, userInfo: [:])
}
// CHECK-LABEL: sil hidden @_TToFE14foreign_errorsCSo8NSObject14badDescriptionfS0_FzT_SS : $@convention(objc_method) (AutoreleasingUnsafeMutablePointer<Optional<NSError>>, NSObject) -> @autoreleased Optional<NSString>
// CHECK-LABEL: sil hidden [thunk] @_TToFE14foreign_errorsCSo8NSObject14badDescriptionfS0_FzT_SS : $@convention(objc_method) (AutoreleasingUnsafeMutablePointer<Optional<NSError>>, NSObject) -> @autoreleased Optional<NSString>
// CHECK: [[T0:%.*]] = function_ref @_TFE14foreign_errorsCSo8NSObject14badDescriptionfS0_FzT_SS : $@convention(method) (@guaranteed NSObject) -> (@owned String, @error ErrorType)
// CHECK: try_apply [[T0]](
// CHECK: bb1([[RESULT:%.*]] : $String):
Expand All @@ -100,11 +100,11 @@ extension NSObject {
// CHECK: bb3([[T0:%.*]] : $Optional<NSString>):
// CHECK: autorelease_return [[T0]] : $Optional<NSString>

// CHECK-LABEL: sil hidden @_TToFE14foreign_errorsCSo8NSObject7takeIntfS0_FzSiT_ : $@convention(objc_method) (Int, AutoreleasingUnsafeMutablePointer<Optional<NSError>>, NSObject) -> Bool
// CHECK-LABEL: sil hidden [thunk] @_TToFE14foreign_errorsCSo8NSObject7takeIntfS0_FzSiT_ : $@convention(objc_method) (Int, AutoreleasingUnsafeMutablePointer<Optional<NSError>>, NSObject) -> Bool
// CHECK: bb0([[I:%[0-9]+]] : $Int, [[ERROR:%[0-9]+]] : $AutoreleasingUnsafeMutablePointer<Optional<NSError>>, [[SELF:%[0-9]+]] : $NSObject)
@objc func takeInt(i: Int) throws { }

// CHECK-LABEL: sil hidden @_TToFE14foreign_errorsCSo8NSObject10takeDoublefS0_FzTSd3intSi7closureFSiSi_T_ : $@convention(objc_method) (Double, Int, AutoreleasingUnsafeMutablePointer<Optional<NSError>>, @convention(block) (Int) -> Int, NSObject) -> Bool
// CHECK-LABEL: sil hidden [thunk] @_TToFE14foreign_errorsCSo8NSObject10takeDoublefS0_FzTSd3intSi7closureFSiSi_T_ : $@convention(objc_method) (Double, Int, AutoreleasingUnsafeMutablePointer<Optional<NSError>>, @convention(block) (Int) -> Int, NSObject) -> Bool
// CHECK: bb0([[D:%[0-9]+]] : $Double, [[INT:%[0-9]+]] : $Int, [[ERROR:%[0-9]+]] : $AutoreleasingUnsafeMutablePointer<Optional<NSError>>, [[CLOSURE:%[0-9]+]] : $@convention(block) (Int) -> Int, [[SELF:%[0-9]+]] : $NSObject):
@objc func takeDouble(d: Double, int: Int, closure: (Int) -> Int) throws {
throw NSError(domain: "", code: 1, userInfo: [:])
Expand Down Expand Up @@ -179,7 +179,7 @@ class ExtremelyErrorProne : ErrorProne {
override func conflict3(obj: AnyObject, error: ()) throws {}
}
// CHECK: sil hidden @_TFC14foreign_errors19ExtremelyErrorProne9conflict3fS0_FzTPSs9AnyObject_5errorT__T_
// CHECK: sil hidden @_TToFC14foreign_errors19ExtremelyErrorProne9conflict3fS0_FzTPSs9AnyObject_5errorT__T_ : $@convention(objc_method) (AnyObject, AutoreleasingUnsafeMutablePointer<Optional<NSError>>, ExtremelyErrorProne) -> Bool
// CHECK: sil hidden [thunk] @_TToFC14foreign_errors19ExtremelyErrorProne9conflict3fS0_FzTPSs9AnyObject_5errorT__T_ : $@convention(objc_method) (AnyObject, AutoreleasingUnsafeMutablePointer<Optional<NSError>>, ExtremelyErrorProne) -> Bool

// These conventions are usable because of swift_error. rdar://21715350
func testNonNilError() throws -> Float {
Expand Down
8 changes: 4 additions & 4 deletions test/SILGen/guaranteed_self.swift
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class C: Fooable, Barrable {
// CHECK: return [[MARKED_SELF]]

// @objc thunk for initializing constructor
// CHECK-LABEL: sil hidden @_TToFC15guaranteed_self1CcfMS0_FT_S0_ : $@convention(objc_method) (@owned C) -> @owned C
// CHECK-LABEL: sil hidden [thunk] @_TToFC15guaranteed_self1CcfMS0_FT_S0_ : $@convention(objc_method) (@owned C) -> @owned C
// CHECK: bb0([[SELF:%.*]] : $C):
// CHECK-NOT: retain{{.*}} [[SELF]]
// CHECK: [[SELF2:%.*]] = apply {{%.*}}([[SELF]])
Expand All @@ -302,7 +302,7 @@ class C: Fooable, Barrable {
// CHECK-NOT: retain
// CHECK-NOT: release

// CHECK-LABEL: sil hidden @_TToFC15guaranteed_self1C3foofS0_FSiT_ : $@convention(objc_method) (Int, C) -> () {
// CHECK-LABEL: sil hidden [thunk] @_TToFC15guaranteed_self1C3foofS0_FSiT_ : $@convention(objc_method) (Int, C) -> () {
// CHECK: bb0({{.*}} [[SELF:%.*]] : $C):
// CHECK: retain{{.*}} [[SELF]]
// CHECK: apply {{.*}} [[SELF]]
Expand All @@ -318,14 +318,14 @@ class C: Fooable, Barrable {
self.bas()
}

// CHECK-LABEL: sil hidden [transparent] @_TToFC15guaranteed_self1Cg5prop1Si : $@convention(objc_method) (C) -> Int
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC15guaranteed_self1Cg5prop1Si : $@convention(objc_method) (C) -> Int
// CHECK: bb0([[SELF:%.*]] : $C):
// CHECK: retain{{.*}} [[SELF]]
// CHECK: apply {{.*}}([[SELF]])
// CHECK: release{{.*}} [[SELF]]
// CHECK-NOT: release{{.*}} [[SELF]]

// CHECK-LABEL: sil hidden [transparent] @_TToFC15guaranteed_self1Cs5prop1Si : $@convention(objc_method) (Int, C) -> ()
// CHECK-LABEL: sil hidden [transparent] [thunk] @_TToFC15guaranteed_self1Cs5prop1Si : $@convention(objc_method) (Int, C) -> ()
// CHECK: bb0({{.*}} [[SELF:%.*]] : $C):
// CHECK: retain{{.*}} [[SELF]]
// CHECK: apply {{.*}} [[SELF]]
Expand Down
10 changes: 5 additions & 5 deletions test/SILGen/objc_blocks_bridging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import Foundation

@objc class Foo {
// CHECK-LABEL: sil hidden @_TToFC20objc_blocks_bridging3Foo3foo
// CHECK-LABEL: sil hidden [thunk] @_TToFC20objc_blocks_bridging3Foo3foo
// CHECK: [[COPY:%.*]] = copy_block %0
// CHECK: [[THUNK:%.*]] = function_ref @_TTRXFdCb_dSi_dSi_XFo_dSi_dSi_
// CHECK: [[BRIDGED:%.*]] = partial_apply [[THUNK]]([[COPY]])
Expand All @@ -15,7 +15,7 @@ import Foundation
return f(x)
}

// CHECK-LABEL: sil hidden @_TToFC20objc_blocks_bridging3Foo3bar
// CHECK-LABEL: sil hidden [thunk] @_TToFC20objc_blocks_bridging3Foo3bar
// CHECK: [[COPY:%.*]] = copy_block %0
// CHECK: [[THUNK:%.*]] = function_ref @_TTRXFdCb_dCSo8NSString_aS__XFo_oSS_oSS_
// CHECK: [[BRIDGED:%.*]] = partial_apply [[THUNK]]([[COPY]])
Expand All @@ -25,7 +25,7 @@ import Foundation
return f(x)
}

// CHECK-LABEL: sil hidden @_TToFC20objc_blocks_bridging3Foo3bas
// CHECK-LABEL: sil hidden [thunk] @_TToFC20objc_blocks_bridging3Foo3bas
// CHECK: [[COPY:%.*]] = copy_block %0
// CHECK: [[THUNK:%.*]] = function_ref @_TTRXFdCb_dGSqCSo8NSString__aGSqS___XFo_oGSqSS__oGSqSS__
// CHECK: [[BRIDGED:%.*]] = partial_apply [[THUNK]]([[COPY]])
Expand All @@ -35,7 +35,7 @@ import Foundation
return f(x)
}

// CHECK-LABEL: sil hidden @_TToFC20objc_blocks_bridging3Foo16cFunctionPointerfS0_FTcSiSi1xSi_Si : $@convention(objc_method) (@convention(c) (Int) -> Int, Int, Foo) -> Int
// CHECK-LABEL: sil hidden [thunk] @_TToFC20objc_blocks_bridging3Foo16cFunctionPointerfS0_FTcSiSi1xSi_Si : $@convention(objc_method) (@convention(c) (Int) -> Int, Int, Foo) -> Int
// CHECK: bb0([[F:%.*]] : $@convention(c) (Int) -> Int, [[X:%.*]] : $Int, [[SELF:%.*]] : $Foo):
// CHECK: [[NATIVE:%.*]] = function_ref @_TFC20objc_blocks_bridging3Foo16cFunctionPointerfS0_FTcSiSi1xSi_Si
// CHECK: apply [[NATIVE]]([[F]], [[X]], [[SELF]])
Expand All @@ -44,7 +44,7 @@ import Foundation
}

// Blocks and C function pointers must not be reabstracted when placed in optionals.
// CHECK-LABEL: sil hidden @_TToFC20objc_blocks_bridging3Foo7optFunc
// CHECK-LABEL: sil hidden [thunk] @_TToFC20objc_blocks_bridging3Foo7optFunc
// CHECK: [[COPY:%.*]] = copy_block %0
// CHECK: [[BLOCK:%.*]] = unchecked_enum_data [[COPY]]
// TODO: redundant reabstractions here
Expand Down
8 changes: 4 additions & 4 deletions test/SILGen/objc_bool_bridging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,18 @@ public func testFunctionPointerMethods(x: Test) {

class NewClass : NSObject {
// CHECK-LABEL: sil hidden @_TFC18objc_bool_bridging8NewClass12takesClosurefS0_FFSbSbT_ : $@convention(method) (@owned @callee_owned (Bool) -> Bool, @guaranteed NewClass) -> () {
// CHECK-OBJCBOOL-LABEL: sil hidden @_TToFC18objc_bool_bridging8NewClass12takesClosurefS0_FFSbSbT_ : $@convention(objc_method) (@convention(block) (ObjCBool) -> ObjCBool, NewClass) -> () {
// CHECK-OBJCBOOL-LABEL: sil hidden [thunk] @_TToFC18objc_bool_bridging8NewClass12takesClosurefS0_FFSbSbT_ : $@convention(objc_method) (@convention(block) (ObjCBool) -> ObjCBool, NewClass) -> () {
func takesClosure(_: (Bool) -> Bool) {}

// CHECK-LABEL: sil hidden @_TFC18objc_bool_bridging8NewClass15takesCBoolBlockfS0_FbSbSbT_ : $@convention(method) (@owned @convention(block) (Bool) -> Bool, @guaranteed NewClass) -> () {
// CHECK-LABEL: sil hidden @_TToFC18objc_bool_bridging8NewClass15takesCBoolBlockfS0_FbSbSbT_ : $@convention(objc_method) (@convention(block) (Bool) -> Bool, NewClass) -> () {
// CHECK-LABEL: sil hidden [thunk] @_TToFC18objc_bool_bridging8NewClass15takesCBoolBlockfS0_FbSbSbT_ : $@convention(objc_method) (@convention(block) (Bool) -> Bool, NewClass) -> () {
func takesCBoolBlock(_: @convention(block) (Bool) -> Bool) {}

// CHECK-OBJCBOOL-LABEL: sil hidden @_TFC18objc_bool_bridging8NewClass18takesObjCBoolBlockfS0_FbV10ObjectiveC8ObjCBoolS2_T_ : $@convention(method) (@owned @convention(block) (ObjCBool) -> ObjCBool, @guaranteed NewClass) -> () {
// CHECK-OBJCBOOL-LABEL: sil hidden @_TToFC18objc_bool_bridging8NewClass18takesObjCBoolBlockfS0_FbV10ObjectiveC8ObjCBoolS2_T_ : $@convention(objc_method) (@convention(block) (ObjCBool) -> ObjCBool, NewClass) -> () {
// CHECK-OBJCBOOL-LABEL: sil hidden [thunk] @_TToFC18objc_bool_bridging8NewClass18takesObjCBoolBlockfS0_FbV10ObjectiveC8ObjCBoolS2_T_ : $@convention(objc_method) (@convention(block) (ObjCBool) -> ObjCBool, NewClass) -> () {
func takesObjCBoolBlock(_: @convention(block) (ObjCBool) -> ObjCBool) {}

// CHECK-LABEL: sil hidden @_TFC18objc_bool_bridging8NewClass23takesDarwinBooleanBlockfS0_FbV6Darwin13DarwinBooleanS2_T_ : $@convention(method) (@owned @convention(block) (DarwinBoolean) -> DarwinBoolean, @guaranteed NewClass) -> () {
// CHECK-LABEL: sil hidden @_TToFC18objc_bool_bridging8NewClass23takesDarwinBooleanBlockfS0_FbV6Darwin13DarwinBooleanS2_T_ : $@convention(objc_method) (@convention(block) (DarwinBoolean) -> DarwinBoolean, NewClass) -> () {
// CHECK-LABEL: sil hidden [thunk] @_TToFC18objc_bool_bridging8NewClass23takesDarwinBooleanBlockfS0_FbV6Darwin13DarwinBooleanS2_T_ : $@convention(objc_method) (@convention(block) (DarwinBoolean) -> DarwinBoolean, NewClass) -> () {
func takesDarwinBooleanBlock(_: @convention(block) (DarwinBoolean) -> DarwinBoolean) {}
}
Loading

0 comments on commit 8b725a9

Please sign in to comment.