aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/CGCall.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index b0a672b6b1..62d5f9fc48 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -751,7 +751,12 @@ void CodeGenFunction::EmitFunctionEpilog(QualType RetTy,
switch (RetAI.getKind()) {
case ABIArgInfo::StructRet:
- EmitAggregateCopy(CurFn->arg_begin(), ReturnValue, RetTy);
+ if (RetTy->isAnyComplexType()) {
+ // FIXME: Volatile
+ ComplexPairTy RT = LoadComplexFromAddr(ReturnValue, false);
+ StoreComplexToAddr(RT, ReturnValue, false);
+ } else
+ EmitAggregateCopy(CurFn->arg_begin(), ReturnValue, RetTy);
break;
case ABIArgInfo::Default: