summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2008-11-15 01:29:05 +0000
committerAnders Carlsson <andersca@mac.com>2008-11-15 01:29:05 +0000
commitd0e4f2b106efe6c78131d382e6a78f62d1db43a3 (patch)
tree0d74c40002d70036d771d719bac887bdd869bf79 /clang/lib/CodeGen
parent9c205bf03cddf12e476b9c2ac328735193f1679c (diff)
downloadbcm5719-llvm-d0e4f2b106efe6c78131d382e6a78f62d1db43a3.tar.gz
bcm5719-llvm-d0e4f2b106efe6c78131d382e6a78f62d1db43a3.zip
Handle complex return values.
llvm-svn: 59345
Diffstat (limited to 'clang/lib/CodeGen')
-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