NAKAMURA Takumi | 9627bb6 | 2013-01-22 01:51:48 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s |
| 2 | // CHECK: [[Vi:%.+]] = alloca %struct.__block_byref_i, align 8 |
Pirama Arumuga Nainar | 33337ca | 2015-05-06 11:48:57 -0700 | [diff] [blame] | 3 | // CHECK: call i32 (...) @rhs() |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 4 | // CHECK: [[V7:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1 |
| 5 | // CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V7]] |
Pirama Arumuga Nainar | 33337ca | 2015-05-06 11:48:57 -0700 | [diff] [blame] | 6 | // CHECK: call i32 (...) @rhs() |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 7 | // CHECK: [[V11:%.+]] = getelementptr inbounds %struct.__block_byref_i, %struct.__block_byref_i* [[Vi]], i32 0, i32 1 |
| 8 | // CHECK: load %struct.__block_byref_i*, %struct.__block_byref_i** [[V11]] |
Mike Stump | 99459b6 | 2009-05-21 21:05:15 +0000 | [diff] [blame] | 9 | |
| 10 | int rhs(); |
| 11 | |
| 12 | void foo() { |
| 13 | __block int i; |
| 14 | i = rhs(); |
Mike Stump | cc0442f | 2009-05-22 19:07:20 +0000 | [diff] [blame] | 15 | i += rhs(); |
Mike Stump | 99459b6 | 2009-05-21 21:05:15 +0000 | [diff] [blame] | 16 | } |