Use the new EmitCallArgs function. No indented functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68652 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index 74b6af1..a623cf1 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -435,16 +435,15 @@
CallArgList Args;
Args.push_back(std::make_pair(RValue::get(BlockLiteral), VoidPtrTy));
+ QualType FnType = BPT->getPointeeType();
+
// And the rest of the arguments.
- for (CallExpr::const_arg_iterator i = E->arg_begin(), e = E->arg_end();
- i != e; ++i)
- Args.push_back(std::make_pair(EmitAnyExprToTemp(*i),
- i->getType()));
+ EmitCallArgs(Args, FnType->getAsFunctionProtoType(),
+ E->arg_begin(), E->arg_end());
// Load the function.
llvm::Value *Func = Builder.CreateLoad(FuncPtr, false, "tmp");
- QualType FnType = BPT->getPointeeType();
QualType ResultType = FnType->getAsFunctionType()->getResultType();
const CGFunctionInfo &FnInfo =