xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenObjC/fpret.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | \
2*f4a2713aSLionel Sambuc// RUN:   FileCheck --check-prefix=CHECK-X86_32 %s
3*f4a2713aSLionel Sambuc//
4*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | \
5*f4a2713aSLionel Sambuc// RUN:   FileCheck --check-prefix=CHECK-X86_64 %s
6*f4a2713aSLionel Sambuc//
7*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple armv7-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -target-abi apcs-gnu -o - %s | \
8*f4a2713aSLionel Sambuc// RUN:   FileCheck --check-prefix=CHECK-ARMV7 %s
9*f4a2713aSLionel Sambuc
10*f4a2713aSLionel Sambuc@interface A
11*f4a2713aSLionel Sambuc-(float) floatValue;
12*f4a2713aSLionel Sambuc-(double) doubleValue;
13*f4a2713aSLionel Sambuc-(long double) longDoubleValue;
14*f4a2713aSLionel Sambuc@end
15*f4a2713aSLionel Sambuc
16*f4a2713aSLionel Sambuc
17*f4a2713aSLionel Sambuc// CHECK-X86_32-LABEL: define void @t0()
18*f4a2713aSLionel Sambuc// CHECK-X86_32: call float bitcast {{.*}} @objc_msgSend_fpret to
19*f4a2713aSLionel Sambuc// CHECK-X86_32: call double bitcast {{.*}} @objc_msgSend_fpret to
20*f4a2713aSLionel Sambuc// CHECK-X86_32: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to
21*f4a2713aSLionel Sambuc// CHECK-X86_32: }
22*f4a2713aSLionel Sambuc//
23*f4a2713aSLionel Sambuc// CHECK-X86_64-LABEL: define void @t0()
24*f4a2713aSLionel Sambuc// CHECK-X86_64: call float bitcast {{.*}} @objc_msgSend to
25*f4a2713aSLionel Sambuc// CHECK-X86_64: call double bitcast {{.*}} @objc_msgSend to
26*f4a2713aSLionel Sambuc// CHECK-X86_64: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to
27*f4a2713aSLionel Sambuc// CHECK-X86_64: }
28*f4a2713aSLionel Sambuc//
29*f4a2713aSLionel Sambuc// CHECK-ARMV7-LABEL: define void @t0()
30*f4a2713aSLionel Sambuc// CHECK-ARMV7: call float bitcast {{.*}} @objc_msgSend to
31*f4a2713aSLionel Sambuc// CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to
32*f4a2713aSLionel Sambuc// CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to
33*f4a2713aSLionel Sambuc// CHECK-ARMV7: }
34*f4a2713aSLionel Sambucvoid t0() {
35*f4a2713aSLionel Sambuc  [(A*)0 floatValue];
36*f4a2713aSLionel Sambuc  [(A*)0 doubleValue];
37*f4a2713aSLionel Sambuc  [(A*)0 longDoubleValue];
38*f4a2713aSLionel Sambuc}
39