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
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 61128c4..8d22629 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -2804,6 +2804,9 @@
   if (RetTy->isVoidType())
     return ABIArgInfo::getIgnore();
 
+  if (RetTy->isAnyComplexType())
+    return ABIArgInfo::getDirect();
+
   if (isAggregateTypeForABI(RetTy))
     return ABIArgInfo::getIndirect(0);