Daniel Dunbar | d7f7d08 | 2010-06-29 22:00:45 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64 -emit-llvm -o - %s | FileCheck %s |
| 2 | |
| 3 | struct s0 { |
| 4 | int x; |
| 5 | }; |
| 6 | |
| 7 | @interface C0 |
| 8 | @property int x0; |
| 9 | @property _Complex int x1; |
| 10 | @property struct s0 x2; |
| 11 | @end |
| 12 | |
| 13 | // Check that we get exactly the message sends we expect, and no more. |
| 14 | // |
| 15 | // CHECK: define void @f0 |
| 16 | void f0(C0 *a) { |
| 17 | // CHECK: objc_msgSend |
| 18 | int l0 = (a.x0 = 1); |
| 19 | |
| 20 | // CHECK: objc_msgSend |
| 21 | _Complex int l1 = (a.x1 = 1); |
| 22 | |
| 23 | // CHECK: objc_msgSend |
| 24 | struct s0 l2 = (a.x2 = (struct s0) { 1 }); |
| 25 | |
| 26 | // CHECK: objc_msgSend |
| 27 | // CHECK: objc_msgSend |
| 28 | int l3 = (a.x0 += 1); |
| 29 | |
Daniel Dunbar | 120bc77 | 2010-06-29 22:44:21 +0000 | [diff] [blame] | 30 | // CHECK: objc_msgSend |
| 31 | // CHECK: objc_msgSend |
| 32 | _Complex int l4 = (a.x1 += 1); |
| 33 | |
Daniel Dunbar | d7f7d08 | 2010-06-29 22:00:45 +0000 | [diff] [blame] | 34 | // CHECK-NOT: objc_msgSend |
| 35 | // CHECK: } |
| 36 | } |