John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-fragile-abi -emit-llvm -o - %s | \ |
Daniel Dunbar | 6c57322 | 2010-07-19 17:11:38 +0000 | [diff] [blame] | 2 | // RUN: FileCheck --check-prefix=CHECK-X86_32 %s |
| 3 | // |
John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 4 | // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-fragile-abi -emit-llvm -o - %s | \ |
Daniel Dunbar | 6c57322 | 2010-07-19 17:11:38 +0000 | [diff] [blame] | 5 | // RUN: FileCheck --check-prefix=CHECK-X86_64 %s |
| 6 | // |
John McCall | d1e40d5 | 2011-10-02 01:16:38 +0000 | [diff] [blame] | 7 | // RUN: %clang_cc1 -triple armv7-apple-darwin10 -fobjc-fragile-abi -emit-llvm -target-abi apcs-gnu -o - %s | \ |
Daniel Dunbar | 6c57322 | 2010-07-19 17:11:38 +0000 | [diff] [blame] | 8 | // RUN: FileCheck --check-prefix=CHECK-ARMV7 %s |
| 9 | |
| 10 | @interface A |
| 11 | -(float) floatValue; |
| 12 | -(double) doubleValue; |
| 13 | -(long double) longDoubleValue; |
| 14 | @end |
| 15 | |
| 16 | |
| 17 | // CHECK-X86_32: define void @t0() |
Fariborz Jahanian | bf1f826 | 2011-02-28 21:19:34 +0000 | [diff] [blame] | 18 | // CHECK-X86_32: call float bitcast {{.*}} @objc_msgSend_fpret to |
Fariborz Jahanian | c0ddef2 | 2011-03-01 17:28:13 +0000 | [diff] [blame] | 19 | // CHECK-X86_32: call double bitcast {{.*}} @objc_msgSend_fpret to |
Fariborz Jahanian | bf1f826 | 2011-02-28 21:19:34 +0000 | [diff] [blame] | 20 | // CHECK-X86_32: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to |
Daniel Dunbar | 6c57322 | 2010-07-19 17:11:38 +0000 | [diff] [blame] | 21 | // CHECK-X86_32: } |
| 22 | // |
| 23 | // CHECK-X86_64: define void @t0() |
Fariborz Jahanian | bf1f826 | 2011-02-28 21:19:34 +0000 | [diff] [blame] | 24 | // CHECK-X86_64: call float bitcast {{.*}} @objc_msgSend to |
| 25 | // CHECK-X86_64: call double bitcast {{.*}} @objc_msgSend to |
| 26 | // CHECK-X86_64: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to |
Daniel Dunbar | 6c57322 | 2010-07-19 17:11:38 +0000 | [diff] [blame] | 27 | // CHECK-X86_64: } |
| 28 | // |
| 29 | // CHECK-ARMV7: define void @t0() |
Fariborz Jahanian | bf1f826 | 2011-02-28 21:19:34 +0000 | [diff] [blame] | 30 | // CHECK-ARMV7: call float bitcast {{.*}} @objc_msgSend to |
| 31 | // CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to |
| 32 | // CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to |
Daniel Dunbar | 6c57322 | 2010-07-19 17:11:38 +0000 | [diff] [blame] | 33 | // CHECK-ARMV7: } |
| 34 | void t0() { |
| 35 | [(A*)0 floatValue]; |
| 36 | [(A*)0 doubleValue]; |
| 37 | [(A*)0 longDoubleValue]; |
| 38 | } |