From 413ebdb1af6fb0d81845b61254daf02ba0449afd Mon Sep 17 00:00:00 2001 From: John McCall Date: Fri, 11 Mar 2011 20:59:21 +0000 Subject: Use a slightly more semantic interface for emitting call arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127494 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprCXX.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/CodeGen/CGExprCXX.cpp') diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index d0d0f4eb1f..0ca024059c 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -956,9 +956,7 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) { placementArg->getType()) && "type mismatch in call argument!"); - allocatorArgs.push_back(std::make_pair(EmitCallArg(*placementArg, argType), - argType)); - + EmitCallArg(allocatorArgs, *placementArg, argType); } // Either we've emitted all the call args, or we have a call to a @@ -970,9 +968,7 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) { // If we still have any arguments, emit them using the type of the argument. for (CXXNewExpr::const_arg_iterator placementArgsEnd = E->placement_arg_end(); placementArg != placementArgsEnd; ++placementArg) { - QualType argType = placementArg->getType(); - allocatorArgs.push_back(std::make_pair(EmitCallArg(*placementArg, argType), - argType)); + EmitCallArg(allocatorArgs, *placementArg, placementArg->getType()); } // Emit the allocation call. -- cgit v1.2.3