• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fblocks -fobjc-arc -o - %s | FileCheck %s
2
3// CHECK-LABEL: define %struct.S1* @_Z4foo1i(
4// CHECK: %[[CALL:[a-z0-9]+]] = call %struct.S1* @_Z4foo0i
5// CHECK: ret %struct.S1* %[[CALL]]
6
7// CHECK-LABEL: define %struct.S1* @_ZN2S22m1Ev(
8// CHECK: %[[CALL:[a-z0-9]+]] = call %struct.S1* @_Z4foo0i
9// CHECK: ret %struct.S1* %[[CALL]]
10
11// CHECK-LABEL: define internal %struct.S1* @Block1_block_invoke(
12// CHECK: %[[CALL:[a-z0-9]+]] = call %struct.S1* @_Z4foo0i
13// CHECK: ret %struct.S1* %[[CALL]]
14
15struct S1;
16
17typedef __attribute__((NSObject)) struct __attribute__((objc_bridge(id))) S1 * S1Ref;
18
19S1Ref foo0(int);
20
21struct S2 {
22  S1Ref m1();
23};
24
25S1Ref foo1(int a) {
26  return foo0(a);
27}
28
29S1Ref S2::m1() {
30  return foo0(0);
31}
32
33S1Ref (^Block1)(void) = ^{
34  return foo0(0);
35};
36