summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index b0a672b6b10..62d5f9fc48a 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/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:
OpenPOWER on IntegriCloud