blob: 7fe550177d4c172946fe380a1cd98129bbb54ea2 [file] [log] [blame]
John McCall5fb5df92012-06-20 06:18:46 +00001// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | \
Daniel Dunbar2c91be42010-07-19 17:11:38 +00002// RUN: FileCheck --check-prefix=CHECK-X86_32 %s
3//
John McCall5fb5df92012-06-20 06:18:46 +00004// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | \
Daniel Dunbar2c91be42010-07-19 17:11:38 +00005// RUN: FileCheck --check-prefix=CHECK-X86_64 %s
6//
John McCall5fb5df92012-06-20 06:18:46 +00007// RUN: %clang_cc1 -triple armv7-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -target-abi apcs-gnu -o - %s | \
Daniel Dunbar2c91be42010-07-19 17:11:38 +00008// 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
Stephen Lin43622612013-08-15 06:47:53 +000017// CHECK-X86_32-LABEL: define void @t0()
Fariborz Jahanian557c1ed2011-02-28 21:19:34 +000018// CHECK-X86_32: call float bitcast {{.*}} @objc_msgSend_fpret to
Fariborz Jahaniancf7f66f2011-03-01 17:28:13 +000019// CHECK-X86_32: call double bitcast {{.*}} @objc_msgSend_fpret to
Fariborz Jahanian557c1ed2011-02-28 21:19:34 +000020// CHECK-X86_32: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to
Daniel Dunbar2c91be42010-07-19 17:11:38 +000021// CHECK-X86_32: }
22//
Stephen Lin43622612013-08-15 06:47:53 +000023// CHECK-X86_64-LABEL: define void @t0()
Fariborz Jahanian557c1ed2011-02-28 21:19:34 +000024// 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 Dunbar2c91be42010-07-19 17:11:38 +000027// CHECK-X86_64: }
28//
Stephen Lin43622612013-08-15 06:47:53 +000029// CHECK-ARMV7-LABEL: define void @t0()
Fariborz Jahanian557c1ed2011-02-28 21:19:34 +000030// 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 Dunbar2c91be42010-07-19 17:11:38 +000033// CHECK-ARMV7: }
34void t0() {
35 [(A*)0 floatValue];
36 [(A*)0 doubleValue];
37 [(A*)0 longDoubleValue];
38}