Add arg_begin() and arg_end() to CallInst and InvokeInst; NFCI
[oota-llvm.git] / lib / Transforms / Utils / Local.cpp
index 19122dd21a71a4cec40084f993bc2a15d8d4ef6e..391ed685766852d6b6b472cce16217f849550a09 100644 (file)
@@ -1210,8 +1210,7 @@ static void changeToUnreachable(Instruction *I, bool UseLLVMTrap) {
 
 /// changeToCall - Convert the specified invoke into a normal call.
 static void changeToCall(InvokeInst *II) {
-  CallSite CS(II);
-  SmallVector<Value*, 8> Args(CS.arg_begin(), CS.arg_end());
+  SmallVector<Value*, 8> Args(II->arg_begin(), II->arg_end());
   SmallVector<OperandBundleDef, 1> OpBundles;
   II->getOperandBundlesAsDefs(OpBundles);
   CallInst *NewCall = CallInst::Create(II->getCalledValue(), Args, OpBundles,