x86_64: Support cases which map to returning multiple values in LLVM
(e.g., _Complex double -> { double, double } return).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63285 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 6d21622..dcff317 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -155,7 +155,6 @@
     return ABIArgInfo(Ignore);
   }
   static ABIArgInfo getCoerce(const llvm::Type *T) { 
-    assert(T->isSingleValueType() && "Can only coerce to simple types");
     return ABIArgInfo(Coerce, T);
   }
   static ABIArgInfo getByVal(unsigned Alignment) {
@@ -541,9 +540,11 @@
 
   case NoClass: break;
   case Integer:
-    assert(0 && "FIXME: Implement MRV"); break;
+    ResType = llvm::StructType::get(ResType, llvm::Type::Int64Ty, NULL);
+    break;
   case SSE:    
-    assert(0 && "FIXME: Implement MRV"); break;
+    ResType = llvm::StructType::get(ResType, llvm::Type::DoubleTy, NULL);
+    break;
 
     // AMD64-ABI 3.2.3p4: Rule 5. If the class is SSEUP, the eightbyte
     // is passed in the upper half of the last used SSE register.
@@ -555,7 +556,7 @@
     break;
 
     // AMD64-ABI 3.2.3p4: Rule 7. If the class is X87UP, the value is
-    // returned together with the previos X87 value in %st0.
+    // returned together with the previous X87 value in %st0.
     //
     // X87UP should always be preceeded by X87, so we don't need to do
     // anything here.