diff options
| author | John McCall <rjmccall@apple.com> | 2011-03-11 20:59:21 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2011-03-11 20:59:21 +0000 |
| commit | 32ea9694156f9d0416c8fde39036f978e7d4c8ab (patch) | |
| tree | 2eb9bb03b1bb7ae1daab000fdb81ffaf0dde1876 /clang/lib/CodeGen/CodeGenFunction.h | |
| parent | d767d06b265287b869e8d6d048e3c9f65fe3cc93 (diff) | |
| download | llvm-32ea9694156f9d0416c8fde39036f978e7d4c8ab.zip llvm-32ea9694156f9d0416c8fde39036f978e7d4c8ab.tar.gz llvm-32ea9694156f9d0416c8fde39036f978e7d4c8ab.tar.bz2 | |
Use a slightly more semantic interface for emitting call arguments.
llvm-svn: 127494
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index cc9fd32..c0040da 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/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 { |
