diff options
author | David Greene <greened@obbligato.org> | 2007-08-27 19:04:21 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2007-08-27 19:04:21 +0000 |
commit | f1355a55f8d815f5385e9a4432195f03b65f3a42 (patch) | |
tree | 22a84137e3fd97e2796d08dd07436bf2f4ff566c /lib/Transforms | |
parent | 44c8265cf86ba3cfc317605726296474aa8d7fa6 (diff) | |
download | external_llvm-f1355a55f8d815f5385e9a4432195f03b65f3a42.zip external_llvm-f1355a55f8d815f5385e9a4432195f03b65f3a42.tar.gz external_llvm-f1355a55f8d815f5385e9a4432195f03b65f3a42.tar.bz2 |
Update InvokeInst to work like CallInst
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/IPO/DeadArgumentElimination.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/IPO/LowerSetJmp.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/LowerGC.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/InlineFunction.cpp | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index d40df48..9853afe 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -447,7 +447,7 @@ Function *ArgPromotion::DoPromotion(Function *F, Instruction *New; if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) { New = new InvokeInst(NF, II->getNormalDest(), II->getUnwindDest(), - &Args[0], Args.size(), "", Call); + Args.begin(), Args.end(), "", Call); cast<InvokeInst>(New)->setCallingConv(CS.getCallingConv()); } else { New = new CallInst(NF, Args.begin(), Args.end(), "", Call); diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index b5ec103..dd5d668 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -174,7 +174,7 @@ bool DAE::DeleteDeadVarargs(Function &Fn) { Instruction *New; if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) { New = new InvokeInst(NF, II->getNormalDest(), II->getUnwindDest(), - &Args[0], Args.size(), "", Call); + Args.begin(), Args.end(), "", Call); cast<InvokeInst>(New)->setCallingConv(CS.getCallingConv()); } else { New = new CallInst(NF, Args.begin(), Args.end(), "", Call); @@ -540,7 +540,7 @@ void DAE::RemoveDeadArgumentsFromFunction(Function *F) { Instruction *New; if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) { New = new InvokeInst(NF, II->getNormalDest(), II->getUnwindDest(), - &Args[0], Args.size(), "", Call); + Args.begin(), Args.end(), "", Call); cast<InvokeInst>(New)->setCallingConv(CS.getCallingConv()); } else { New = new CallInst(NF, Args.begin(), Args.end(), "", Call); diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp index 2fa6a10..dbc3199 100644 --- a/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/lib/Transforms/IPO/LowerSetJmp.cpp @@ -475,7 +475,7 @@ void LowerSetJmp::visitCallInst(CallInst& CI) std::vector<Value*> Params(CI.op_begin() + 1, CI.op_end()); InvokeInst* II = new InvokeInst(CI.getCalledValue(), NewBB, PrelimBBMap[Func], - &Params[0], Params.size(), CI.getName(), Term); + Params.begin(), Params.end(), CI.getName(), Term); // Replace the old call inst with the invoke inst and remove the call. CI.replaceAllUsesWith(II); diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 2fad0ab..416e1f0 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -8006,7 +8006,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { Instruction *NC; if (InvokeInst *II = dyn_cast<InvokeInst>(Caller)) { NC = new InvokeInst(Callee, II->getNormalDest(), II->getUnwindDest(), - &Args[0], Args.size(), Caller->getName(), Caller); + Args.begin(), Args.end(), Caller->getName(), Caller); cast<InvokeInst>(NC)->setCallingConv(II->getCallingConv()); } else { NC = new CallInst(Callee, Args.begin(), Args.end(), diff --git a/lib/Transforms/Scalar/LowerGC.cpp b/lib/Transforms/Scalar/LowerGC.cpp index 8e6611a..e157684 100644 --- a/lib/Transforms/Scalar/LowerGC.cpp +++ b/lib/Transforms/Scalar/LowerGC.cpp @@ -331,7 +331,7 @@ bool LowerGC::runOnFunction(Function &F) { std::vector<Value*> Args(CI->op_begin()+1, CI->op_end()); Value *II = new InvokeInst(CI->getCalledValue(), NewBB, Cleanup, - &Args[0], Args.size(), CI->getName(), CBB); + Args.begin(), Args.end(), CI->getName(), CBB); CI->replaceAllUsesWith(II); delete CI; } diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index 9735a2f..96ad420 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -85,7 +85,7 @@ static void HandleInlinedInvoke(InvokeInst *II, BasicBlock *FirstNewBlock, SmallVector<Value*, 8> InvokeArgs(CI->op_begin()+1, CI->op_end()); InvokeInst *II = new InvokeInst(CI->getCalledValue(), Split, InvokeDest, - &InvokeArgs[0], InvokeArgs.size(), + InvokeArgs.begin(), InvokeArgs.end(), CI->getName(), BB->getTerminator()); II->setCallingConv(CI->getCallingConv()); |