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/CodeGenFunction.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'lib/CodeGen/CodeGenFunction.h') diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index cc9fd32e1a..c0040daed6 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -2087,12 +2087,12 @@ public: llvm::BasicBlock *getTrapBB(); /// EmitCallArg - Emit a single call argument. - RValue EmitCallArg(const Expr *E, QualType ArgType); + void EmitCallArg(CallArgList &args, const Expr *E, QualType ArgType); /// EmitDelegateCallArg - We are performing a delegate call; that /// is, the current function is delegating to another one. Produce /// a r-value suitable for passing the given parameter. - RValue EmitDelegateCallArg(const VarDecl *Param); + void EmitDelegateCallArg(CallArgList &args, const VarDecl *param); private: void EmitReturnOfRValue(RValue RV, QualType Ty); @@ -2157,8 +2157,7 @@ private: getContext().getCanonicalType(ActualArgType).getTypePtr() && "type mismatch in call argument!"); #endif - Args.push_back(std::make_pair(EmitCallArg(*Arg, ArgType), - ArgType)); + EmitCallArg(Args, *Arg, ArgType); } // Either we've emitted all the call args, or we have a call to a @@ -2169,11 +2168,8 @@ private: } // If we still have any arguments, emit them using the type of the argument. - for (; Arg != ArgEnd; ++Arg) { - QualType ArgType = Arg->getType(); - Args.push_back(std::make_pair(EmitCallArg(*Arg, ArgType), - ArgType)); - } + for (; Arg != ArgEnd; ++Arg) + EmitCallArg(Args, *Arg, Arg->getType()); } const TargetCodeGenInfo &getTargetHooks() const { -- cgit v1.2.3-18-g5258