blob: 135e0c7551942bbb5c023ce560a22295aed5fc1a [file] [log] [blame]
Fariborz Jahanian25755852010-12-02 17:58:10 +00001// RUN: %clang_cc1 %s -emit-llvm -o - -fblocks | FileCheck %s
2// rdar://8594790
3
4struct A {
5 int x;
6 A(const A &);
7 A();
8 ~A();
9};
10
11int main()
12{
13 __block A BYREF_VAR;
14 ^{ BYREF_VAR.x = 1234; };
15 return 0;
16}
17
18// CHECK: define internal void @__Block_byref_object_copy_
Eli Friedman41f1fd42011-06-13 22:51:21 +000019// CHECK: call {{.*}} @_ZN1AC1ERKS_
Fariborz Jahanian25755852010-12-02 17:58:10 +000020// CHECK: define internal void @__Block_byref_object_dispose_
Eli Friedman41f1fd42011-06-13 22:51:21 +000021// CHECK: call {{.*}} @_ZN1AD1Ev
Fariborz Jahanian25755852010-12-02 17:58:10 +000022// CHECK: define internal void @__copy_helper_block_
23// CHECK: call void @_Block_object_assign
24// CHECK: define internal void @__destroy_helper_block_
25// CHECK: call void @_Block_object_dispose