diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-05-02 17:57:46 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-05-02 17:57:46 +0000 |
commit | 04c9a49ee251424b11d7c4e8b1c23637684cecb6 (patch) | |
tree | 35a9261292cc0b36ad30510e93c950816c462f65 /lib/CodeGen/CGClass.cpp | |
parent | 61b1efe2d0b459a98962fd9b4c097ad8bb9bfdec (diff) |
Simplify code a bit by using CallArgList::add. No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130699 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r-- | lib/CodeGen/CGClass.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp index 1227b4c1b2..ca8b6576c7 100644 --- a/lib/CodeGen/CGClass.cpp +++ b/lib/CodeGen/CGClass.cpp @@ -1199,15 +1199,14 @@ CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(const CXXConstructorDecl *D, CallArgList Args; // Push the this ptr. - Args.push_back(std::make_pair(RValue::get(This), - D->getThisType(getContext()))); + Args.add(RValue::get(This), D->getThisType(getContext())); // Push the src ptr. QualType QT = *(FPT->arg_type_begin()); const llvm::Type *t = CGM.getTypes().ConvertType(QT); Src = Builder.CreateBitCast(Src, t); - Args.push_back(std::make_pair(RValue::get(Src), QT)); + Args.add(RValue::get(Src), QT); // Skip over first argument (Src). ++ArgBeg; @@ -1243,15 +1242,14 @@ CodeGenFunction::EmitDelegateCXXConstructorCall(const CXXConstructorDecl *Ctor, assert(I != E && "no parameters to constructor"); // this - DelegateArgs.push_back(std::make_pair(RValue::get(LoadCXXThis()), - (*I)->getType())); + DelegateArgs.add(RValue::get(LoadCXXThis()), (*I)->getType()); ++I; // vtt if (llvm::Value *VTT = GetVTTParameter(*this, GlobalDecl(Ctor, CtorType), /*ForVirtualBase=*/false)) { QualType VoidPP = getContext().getPointerType(getContext().VoidPtrTy); - DelegateArgs.push_back(std::make_pair(RValue::get(VTT), VoidPP)); + DelegateArgs.add(RValue::get(VTT), VoidPP); if (CodeGenVTables::needsVTTParameter(CurGD)) { assert(I != E && "cannot skip vtt parameter, already done with args"); |