diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2010-07-19 17:11:38 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2010-07-19 17:11:38 +0000 |
| commit | 2c91be42610edf54b2167d40202441fe6b9fa4ff (patch) | |
| tree | 14d5fe44d58adc4629269abf8a90a2f1b790c7ae /clang/test/CodeGenObjC | |
| parent | 354e96df953f679b8a355720aa92e862ee4b94ae (diff) | |
| download | bcm5719-llvm-2c91be42610edf54b2167d40202441fe6b9fa4ff.tar.gz bcm5719-llvm-2c91be42610edf54b2167d40202441fe6b9fa4ff.zip | |
IRgen: Add a test case I forgot to commit at some point.
llvm-svn: 108713
Diffstat (limited to 'clang/test/CodeGenObjC')
| -rw-r--r-- | clang/test/CodeGenObjC/fpret.m | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/fpret.m b/clang/test/CodeGenObjC/fpret.m new file mode 100644 index 00000000000..48848885c1f --- /dev/null +++ b/clang/test/CodeGenObjC/fpret.m @@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o - %s | \ +// RUN: FileCheck --check-prefix=CHECK-X86_32 %s +// +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | \ +// RUN: FileCheck --check-prefix=CHECK-X86_64 %s +// +// RUN: %clang_cc1 -triple armv7-apple-darwin10 -emit-llvm -target-abi apcs-gnu -o - %s | \ +// RUN: FileCheck --check-prefix=CHECK-ARMV7 %s + +@interface A +-(float) floatValue; +-(double) doubleValue; +-(long double) longDoubleValue; +@end + + +// CHECK-X86_32: define void @t0() +// CHECK-X86_32: call float bitcast {{.*}} @objc_msgSend_fpret to +// CHECK-X86_32: call double {{.*}} @objc_msgSend_fpret( +// CHECK-X86_32: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to +// CHECK-X86_32: } +// +// CHECK-X86_64: define void @t0() +// CHECK-X86_64: call float bitcast {{.*}} @objc_msgSend to +// CHECK-X86_64: call double bitcast {{.*}} @objc_msgSend to +// CHECK-X86_64: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to +// CHECK-X86_64: } +// +// CHECK-ARMV7: define void @t0() +// CHECK-ARMV7: call float bitcast {{.*}} @objc_msgSend to +// CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to +// CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to +// CHECK-ARMV7: } +void t0() { + [(A*)0 floatValue]; + [(A*)0 doubleValue]; + [(A*)0 longDoubleValue]; +} |

