diff options
| author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2012-12-17 04:20:17 +0000 |
|---|---|---|
| committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2012-12-17 04:20:17 +0000 |
| commit | a3d121cd61914249c89e7c191cb506d3a2b4af93 (patch) | |
| tree | 800e2c38495e020012aa6c202ff816a0ea6337cb /clang/lib/CodeGen/TargetInfo.cpp | |
| parent | ccca504f3a08a47f7852fe9a8f98e2f3c68d8b1f (diff) | |
| download | bcm5719-llvm-a3d121cd61914249c89e7c191cb506d3a2b4af93.tar.gz bcm5719-llvm-a3d121cd61914249c89e7c191cb506d3a2b4af93.zip | |
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.
llvm-svn: 170302
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
| -rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 61128c401c5..8d22629a0bf 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/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); |

