blob: 015a04275698ea7dac78580b10ddef7e46966aff [file] [log] [blame]
Daniel Dunbar6c573222010-07-19 17:11:38 +00001// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o - %s | \
2// RUN: FileCheck --check-prefix=CHECK-X86_32 %s
3//
4// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | \
5// RUN: FileCheck --check-prefix=CHECK-X86_64 %s
6//
7// RUN: %clang_cc1 -triple armv7-apple-darwin10 -emit-llvm -target-abi apcs-gnu -o - %s | \
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 Jahanian3d04a0e2011-02-28 19:55:59 +000018// CHECK-X86_32: call float bitcast (double (i8*, i8*)* @objc_msgSend_fpret to
19// CHECK-X86_32: call double @objc_msgSend_fpret(
20// CHECK-X86_32: call x86_fp80 bitcast (double (i8*, i8*)* @objc_msgSend_fpret to
Daniel Dunbar6c573222010-07-19 17:11:38 +000021// CHECK-X86_32: }
22//
23// CHECK-X86_64: define void @t0()
Fariborz Jahanian3d04a0e2011-02-28 19:55:59 +000024// CHECK-X86_64: call float bitcast (i8* (i8*, i8*)* @objc_msgSend to
25// CHECK-X86_64: call double bitcast (i8* (i8*, i8*)* @objc_msgSend to
26// CHECK-X86_64: call x86_fp80 bitcast (double (i8*, i8*)* @objc_msgSend_fpret to
Daniel Dunbar6c573222010-07-19 17:11:38 +000027// CHECK-X86_64: }
28//
29// CHECK-ARMV7: define void @t0()
Fariborz Jahanian3d04a0e2011-02-28 19:55:59 +000030// CHECK-ARMV7: call float bitcast (i8* (i8*, i8*)* @objc_msgSend to
31// CHECK-ARMV7: call double bitcast (i8* (i8*, i8*)* @objc_msgSend to
32// CHECK-ARMV7: call double bitcast (i8* (i8*, i8*)* @objc_msgSend to
Daniel Dunbar6c573222010-07-19 17:11:38 +000033// CHECK-ARMV7: }
34void t0() {
35 [(A*)0 floatValue];
36 [(A*)0 doubleValue];
37 [(A*)0 longDoubleValue];
38}