diff options
author | Anders Carlsson <andersca@mac.com> | 2011-10-31 16:27:11 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2011-10-31 16:27:11 +0000 |
commit | eea64802558cc398571938b1f28cda1d4fa79ec3 (patch) | |
tree | cff7c15350ed90fd8824ec94b26d93678d9da975 /include/clang/Basic/TargetInfo.h | |
parent | f453cb9f677e16c00b358ec91eccf5f003765dc6 (diff) |
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
Diffstat (limited to 'include/clang/Basic/TargetInfo.h')
-rw-r--r-- | include/clang/Basic/TargetInfo.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index a87af2fbbc..39d4fe9c02 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -91,6 +91,7 @@ protected: unsigned HasAlignMac68kSupport : 1; unsigned RealTypeUsesObjCFPRet : 3; + unsigned ComplexLongDoubleUsesFP2Ret : 1; // TargetInfo Constructor. Default initializes all fields. TargetInfo(const std::string &T); @@ -327,6 +328,12 @@ public: return RealTypeUsesObjCFPRet & (1 << T); } + /// \brief Check whether _Complex long double should use the "fp2ret" flavor + /// of Obj-C message passing on this target. + bool useObjCFP2RetForComplexLongDouble() const { + return ComplexLongDoubleUsesFP2Ret; + } + ///===---- Other target property query methods --------------------------===// /// getTargetDefines - Appends the target-specific #define values for this |