Pass the LLVM IR version of argument types down into computeInfo.
This is somewhat annoying to do this at this level, but it avoids
having ABIInfo know depend on CodeGenTypes for a hint.

Nothing is using this yet, so no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107111 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 7ade427..d7a03c9 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -244,8 +244,16 @@
                           ArgTys);
   FunctionInfos.InsertNode(FI, InsertPos);
 
+  // ABI lowering wants to know what our preferred type for the argument is in
+  // various situations, pass it in.
+  llvm::SmallVector<const llvm::Type *, 8> PreferredArgTypes;
+  for (llvm::SmallVectorImpl<CanQualType>::const_iterator
+       I = ArgTys.begin(), E = ArgTys.end(); I != E; ++I)
+    PreferredArgTypes.push_back(ConvertType(*I));
+
   // Compute ABI information.
-  getABIInfo().computeInfo(*FI, getContext(), TheModule.getContext());
+  getABIInfo().computeInfo(*FI, getContext(), TheModule.getContext(),
+                           PreferredArgTypes.data(), PreferredArgTypes.size());
 
   return *FI;
 }