Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In x86_64, when calling an Objective-C method that returns a _Complex…
… long double, make sure to use the objc_msgSend_fp2ret function which ensures that the return value will be {0, 0} if the receiver is nil. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143350 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Anders Carlsson
committed
Oct 31, 2011
1 parent
f453cb9
commit eea6480
Showing
8 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-fragile-abi -emit-llvm -o - %s | \ | ||
// RUN: FileCheck --check-prefix=CHECK-X86_32 %s | ||
// | ||
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-fragile-abi -emit-llvm -o - %s | \ | ||
// RUN: FileCheck --check-prefix=CHECK-X86_64 %s | ||
// | ||
// RUN: %clang_cc1 -triple armv7-apple-darwin10 -fobjc-fragile-abi -emit-llvm -target-abi apcs-gnu -o - %s | \ | ||
// RUN: FileCheck --check-prefix=CHECK-ARMV7 %s | ||
|
||
@interface A | ||
-(_Complex long double) complexLongDoubleValue; | ||
@end | ||
|
||
|
||
// CHECK-X86_32: define void @t0() | ||
// CHECK-X86_32: call void bitcast {{.*}} @objc_msgSend_stret to | ||
// CHECK-X86_32: } | ||
// | ||
// CHECK-X86_64: define void @t0() | ||
// CHECK-X86_64: call { x86_fp80, x86_fp80 } bitcast {{.*}} @objc_msgSend_fp2ret to | ||
// CHECK-X86_64: } | ||
// | ||
// CHECK-ARMV7: define void @t0() | ||
// CHECK-ARMV7: call i128 bitcast {{.*}} @objc_msgSend to | ||
// CHECK-ARMV7: } | ||
void t0() { | ||
[(A*)0 complexLongDoubleValue]; | ||
} |