diff options
author | Pawel Wodnicki <pawel@32bitmicro.com> | 2012-11-21 22:21:40 +0000 |
---|---|---|
committer | Pawel Wodnicki <pawel@32bitmicro.com> | 2012-11-21 22:21:40 +0000 |
commit | 3e2cbf9d08ffd6f26302c19fdc7997e441c741e9 (patch) | |
tree | 03f936edbb07aad478f391f460fe3602da8044e4 /lib/Transforms/IPO/ArgumentPromotion.cpp | |
parent | 7022c651cab8a4e3e310e024a2028eb9fa5b482e (diff) | |
download | llvm-3e2cbf9d08ffd6f26302c19fdc7997e441c741e9.tar.gz llvm-3e2cbf9d08ffd6f26302c19fdc7997e441c741e9.tar.bz2 llvm-3e2cbf9d08ffd6f26302c19fdc7997e441c741e9.tar.xz |
Reverting 168457
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168465 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index be48b2063f..8a0274b5ff 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -611,7 +611,7 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // Recompute the parameter attributes list based on the new arguments for // the function. - NF->setAttributes(AttrListPtr::get(F->getContext(), AttributesVec)); + NF->setAttributes(AttrListPtr::get(AttributesVec)); AttributesVec.clear(); F->getParent()->getFunctionList().insert(F, NF); @@ -731,13 +731,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(II->getContext(), - AttributesVec)); + 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(New->getContext(), - AttributesVec)); + cast<CallInst>(New)->setAttributes(AttrListPtr::get(AttributesVec)); if (cast<CallInst>(Call)->isTailCall()) cast<CallInst>(New)->setTailCall(); } |