[cfe-commits] r59345 - /cfe/trunk/lib/CodeGen/CGCall.cpp
Anders Carlsson
andersca at mac.com
Fri Nov 14 17:29:07 PST 2008
Author: andersca
Date: Fri Nov 14 19:29:05 2008
New Revision: 59345
URL: http://llvm.org/viewvc/llvm-project?rev=59345&view=rev
Log:
Handle complex return values.
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=59345&r1=59344&r2=59345&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Fri Nov 14 19:29:05 2008
@@ -751,7 +751,12 @@
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:
More information about the cfe-commits
mailing list