aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2012-12-17 04:20:17 +0000
committerBill Schmidt <wschmidt@linux.vnet.ibm.com>2012-12-17 04:20:17 +0000
commit9e6111ad10d29802d8eff99c941d262979e99084 (patch)
tree733ef18bc652e03630cb5715e1d5a523950efc6f /lib/CodeGen/TargetInfo.cpp
parent355a1660d6a3c66546dfd2476b60fa7a19b70ee3 (diff)
This patch fixes PR13624, which notes a 64-bit PowerPC ELF ABI
incompatibility with how complex values are returned. It is sufficient to flag all complex types as direct rather than indirect. A new test case is provided that checks correct IR generation for the various supported flavors of _Complex. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170302 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
-rw-r--r--lib/CodeGen/TargetInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 61128c401c..8d22629a0b 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -2804,6 +2804,9 @@ PPC64_SVR4_ABIInfo::classifyReturnType(QualType RetTy) const {
if (RetTy->isVoidType())
return ABIArgInfo::getIgnore();
+ if (RetTy->isAnyComplexType())
+ return ABIArgInfo::getDirect();
+
if (isAggregateTypeForABI(RetTy))
return ABIArgInfo::getIndirect(0);