aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-04-08 23:13:16 +0000
committerAnders Carlsson <andersca@mac.com>2009-04-08 23:13:16 +0000
commit782f397c1459ef7d8b910c0fb6b95c5f1c19c14f (patch)
tree7ae6d03c0f7cb48e1e2e94ade0ad8075b595f939 /lib/CodeGen/CGBlocks.cpp
parent748dd20b55f64bc7e398a3f2210136581531fc7a (diff)
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
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index 74b6af1425..a623cf18cf 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -435,16 +435,15 @@ RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E) {
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 =