diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-07-14 23:39:36 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-07-14 23:39:36 +0000 |
commit | 6f2e839693ea64932e37f2e20b881065170035d9 (patch) | |
tree | d96a4c38f9835e88b403106566ce17e1b9b553d6 /clang/lib/Basic | |
parent | 37d91d84af790736d526fb3e43359baed23a831e (diff) | |
download | bcm5719-llvm-6f2e839693ea64932e37f2e20b881065170035d9.tar.gz bcm5719-llvm-6f2e839693ea64932e37f2e20b881065170035d9.zip |
CodeGen/ObjC/NeXT: Fix Obj-C message send to match llvm-gcc when choosing
whether to use objc_msgSend_fpret; the choice is target dependent, not Obj-C ABI
dependent.
- <rdar://problem/8139758> arm objc _objc_msgSend_fpret bug
llvm-svn: 108379
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/TargetInfo.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp index e4eaf631378..7fcf372a368 100644 --- a/clang/lib/Basic/TargetInfo.cpp +++ b/clang/lib/Basic/TargetInfo.cpp @@ -55,6 +55,9 @@ TargetInfo::TargetInfo(const std::string &T) : Triple(T) { "i64:64:64-f32:32:32-f64:64:64-n32"; UserLabelPrefix = "_"; HasAlignMac68kSupport = false; + + // Default to no types using fpret. + RealTypeUsesObjCFPRet = 0; } // Out of line virtual dtor for TargetInfo. diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 8d793163bc0..fdf63e738b5 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -1245,6 +1245,11 @@ public: PtrDiffType = SignedInt; IntPtrType = SignedInt; RegParmMax = 3; + + // Use fpret for all types. + RealTypeUsesObjCFPRet = ((1 << TargetInfo::Float) | + (1 << TargetInfo::Double) | + (1 << TargetInfo::LongDouble)); } virtual const char *getVAListDeclaration() const { return "typedef char* __builtin_va_list;"; @@ -1411,6 +1416,9 @@ public: DescriptionString = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-" "i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-" "a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"; + + // Use fpret only for long double. + RealTypeUsesObjCFPRet = (1 << TargetInfo::LongDouble); } virtual const char *getVAListDeclaration() const { return "typedef struct __va_list_tag {" |