Fariborz Jahanian | 2575585 | 2010-12-02 17:58:10 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -o - -fblocks | FileCheck %s |
| 2 | // rdar://8594790 |
| 3 | |
| 4 | struct A { |
| 5 | int x; |
| 6 | A(const A &); |
| 7 | A(); |
| 8 | ~A(); |
| 9 | }; |
| 10 | |
| 11 | int 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 Friedman | 41f1fd4 | 2011-06-13 22:51:21 +0000 | [diff] [blame] | 19 | // CHECK: call {{.*}} @_ZN1AC1ERKS_ |
Fariborz Jahanian | 2575585 | 2010-12-02 17:58:10 +0000 | [diff] [blame] | 20 | // CHECK: define internal void @__Block_byref_object_dispose_ |
Eli Friedman | 41f1fd4 | 2011-06-13 22:51:21 +0000 | [diff] [blame] | 21 | // CHECK: call {{.*}} @_ZN1AD1Ev |
Fariborz Jahanian | 2575585 | 2010-12-02 17:58:10 +0000 | [diff] [blame] | 22 | // 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 |