diff options
author | Chris Lattner <sabre@nondot.org> | 2012-05-28 01:47:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-05-28 01:47:44 +0000 |
commit | d509d0b532ec2358b3f341d4a4cd1411cb8b5db2 (patch) | |
tree | ccb049af92ff02e28b5416be519b91d2881e436a /lib/Transforms/IPO/ArgumentPromotion.cpp | |
parent | 2a9d3b79db1f192dba43b8b16755a7822b05f798 (diff) | |
download | llvm-d509d0b532ec2358b3f341d4a4cd1411cb8b5db2.tar.gz llvm-d509d0b532ec2358b3f341d4a4cd1411cb8b5db2.tar.bz2 llvm-d509d0b532ec2358b3f341d4a4cd1411cb8b5db2.tar.xz |
switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157556 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index e160f63ae3..95a3b3d7c8 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -616,8 +616,7 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // Recompute the parameter attributes list based on the new arguments for // the function. - NF->setAttributes(AttrListPtr::get(AttributesVec.begin(), - AttributesVec.end())); + NF->setAttributes(AttrListPtr::get(AttributesVec)); AttributesVec.clear(); F->getParent()->getFunctionList().insert(F, NF); @@ -734,13 +733,11 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, New = InvokeInst::Create(NF, II->getNormalDest(), II->getUnwindDest(), Args, "", Call); cast<InvokeInst>(New)->setCallingConv(CS.getCallingConv()); - cast<InvokeInst>(New)->setAttributes(AttrListPtr::get(AttributesVec.begin(), - AttributesVec.end())); + cast<InvokeInst>(New)->setAttributes(AttrListPtr::get(AttributesVec)); } else { New = CallInst::Create(NF, Args, "", Call); cast<CallInst>(New)->setCallingConv(CS.getCallingConv()); - cast<CallInst>(New)->setAttributes(AttrListPtr::get(AttributesVec.begin(), - AttributesVec.end())); + cast<CallInst>(New)->setAttributes(AttrListPtr::get(AttributesVec)); if (cast<CallInst>(Call)->isTailCall()) cast<CallInst>(New)->setTailCall(); } |