aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/SimplifyCFGPass.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-03-24 13:21:49 +0000
committerGabor Greif <ggreif@gmail.com>2010-03-24 13:21:49 +0000
commitc9f7500d1752feac7cece26d20007a99d21f677c (patch)
tree855c74f792cd3e5ba272a2a73df5a17feb2729ab /lib/Transforms/Scalar/SimplifyCFGPass.cpp
parent6d6aaeca4f50e1ce101b71b33a52cbd66db01c52 (diff)
downloadexternal_llvm-c9f7500d1752feac7cece26d20007a99d21f677c.zip
external_llvm-c9f7500d1752feac7cece26d20007a99d21f677c.tar.gz
external_llvm-c9f7500d1752feac7cece26d20007a99d21f677c.tar.bz2
Finally land the InvokeInst operand reordering.
I have audited all getOperandNo calls now, fixing hidden assumptions. CallSite related uglyness will be eliminated successively. Note this patch has a long and griveous history, for all the back-and-forths have a look at CallSite.h's log. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99399 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/SimplifyCFGPass.cpp')
-rw-r--r--lib/Transforms/Scalar/SimplifyCFGPass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/lib/Transforms/Scalar/SimplifyCFGPass.cpp
index 738c5e8..b621e8d 100644
--- a/lib/Transforms/Scalar/SimplifyCFGPass.cpp
+++ b/lib/Transforms/Scalar/SimplifyCFGPass.cpp
@@ -79,7 +79,7 @@ static void ChangeToUnreachable(Instruction *I) {
/// ChangeToCall - Convert the specified invoke into a normal call.
static void ChangeToCall(InvokeInst *II) {
BasicBlock *BB = II->getParent();
- SmallVector<Value*, 8> Args(II->op_begin()+3, II->op_end());
+ SmallVector<Value*, 8> Args(II->op_begin(), II->op_end() - 3);
CallInst *NewCall = CallInst::Create(II->getCalledValue(), Args.begin(),
Args.end(), "", II);
NewCall->takeName(II);