 // CHECK-LABEL: sil hidden @_TF13objc_bridging7setZangFTCSo3FooSb_T_
 // CHECK: bb0([[ARG0:%.*]] : $Foo, [[ARG1:%.*]] : $Bool):
 // CHECK:   [[BORROWED_ARG0:%.*]] = begin_borrow [[ARG0]]
-// CHECK:   apply {{%.*}}([[ARG1]], [[BORROWED_ARG0]]) : $@convention(objc_method) (Bool, Foo) -> ()
+// CHECK:   [[METHOD:%.*]] = class_method [volatile] [[BORROWED_ARG0]] : $Foo, #Foo.setZang!1.foreign
+// CHECK:   apply [[METHOD]]([[ARG1]], [[BORROWED_ARG0]]) : $@convention(objc_method) (Bool, Foo) -> ()
+// CHECK:   end_borrow [[BORROWED_ARG0]] from [[ARG0]]
+// CHECK:   destroy_value [[ARG0]]
+// CHECK: } // end sil function '_TF13objc_bridging7setZangFTCSo3FooSb_T_' 
 
 // NSString *bar(void);
 func callBar() -> String {

// CHECK-LABEL: sil hidden @_TF13objc_bridging7getZangFCSo3FooSb
// CHECK: bb0([[ARG:%.*]] : $Foo)
// CHECK:   [[BORROWED_ARG:%.*]] = begin_borrow [[ARG]]
// CHECK:   [[BOOL:%.*]] = apply {{%.*}}([[BORROWED_ARG]]) : $@convention(objc_method) (Foo) -> Bool
// CHECK:   return [[BOOL]]

// @interface Foo -(void) setZang: (_Bool)b; @end

// CHECK-LABEL: sil hidden @_TF13objc_bridging6setFoo
// CHECK: bb0([[ARG0:%.*]] : $Foo, {{%.*}} : $String):
// CHECK:   [[BORROWED_ARG0:%.*]] = begin_borrow [[ARG0]]
// CHECK:   [[SET_FOO:%.*]] = class_method [volatile] [[BORROWED_ARG0]] : $Foo, #Foo.setFoo!1.foreign
// CHECK:   [[NV:%.*]] = load
// CHECK:   [[OPT_NATIVE:%.*]] = enum $Optional<String>, #Optional.some!enumelt.1, [[NV]]
// CHECK:   [[HAS_VALUE:%.*]] = select_enum [[OPT_NATIVE]]
// CHECK:   cond_br [[HAS_VALUE:%.*]], [[SOME_BB:bb[0-9]+]], [[NONE_BB:bb[0-9]+]]
//
// CHECK: [[SOME_BB]]:
// CHECK:   [[NATIVE:%.*]] = unchecked_enum_data [[OPT_NATIVE]]
// CHECK:   [[STRING_TO_NSSTRING:%.*]] = function_ref @_TFE10FoundationSS19_bridgeToObjectiveCfT_CSo8NSString
// CHECK:   [[BORROWED_NATIVE:%.*]] = begin_borrow [[NATIVE]]
// CHECK:   [[BRIDGED:%.*]] = apply [[STRING_TO_NSSTRING]]([[BORROWED_NATIVE]])
// CHECK:   [[OPT_BRIDGED:%.*]] = enum $Optional<NSString>, #Optional.some!enumelt.1, [[BRIDGED]]
// CHECK:   end_borrow [[BORROWED_NATIVE]] from [[NATIVE]]
// CHECK:   destroy_value [[NATIVE]]
// CHECK:   br [[CONT_BB:bb[0-9]+]]([[OPT_BRIDGED]] : $Optional<NSString>)
//
// CHECK: [[NONE_BB]]:
// CHECK:   [[OPT_BRIDGED:%.*]] = enum $Optional<NSString>, #Optional.none!enumelt
// CHECK:   br [[CONT_BB]]([[OPT_BRIDGED]] : $Optional<NSString>)
//
// CHECK: [[CONT_BB]]([[OPT_BRIDGED:%.*]] : $Optional<NSString>):
// CHECK:   apply [[SET_FOO]]([[OPT_BRIDGED]], [[BORROWED_ARG0]]) : $@convention(objc_method) (Optional<NSString>, Foo) -> ()
// CHECK:   destroy_value [[OPT_BRIDGED]]
// CHECK:   end_borrow [[BORROWED_ARG0]] from [[ARG0]]
// CHECK:   destroy_value [[ARG0]]
// CHECK: }

// @interface Foo -(BOOL) zim; @end
