summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/LowerInvoke.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-15 08:37:34 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-15 08:37:34 +0000
commita3efbb15ddd5aa9006564cd79086723640084878 (patch)
treebaf8eacf902c618293d636c233339c13722a5b15 /lib/Transforms/Utils/LowerInvoke.cpp
parente083805724196bd45a3612bf9373f503b5b8a7e0 (diff)
downloadllvm-a3efbb15ddd5aa9006564cd79086723640084878.tar.gz
llvm-a3efbb15ddd5aa9006564cd79086723640084878.tar.bz2
llvm-a3efbb15ddd5aa9006564cd79086723640084878.tar.xz
Convert CallInst and InvokeInst APIs to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp
index 3450316721..f77d19de90 100644
--- a/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/lib/Transforms/Utils/LowerInvoke.cpp
@@ -176,8 +176,7 @@ bool LowerInvoke::insertCheapEHSupport(Function &F) {
SmallVector<Value*,16> CallArgs(II->op_begin(), II->op_end() - 3);
// Insert a normal call instruction...
CallInst *NewCall = CallInst::Create(II->getCalledValue(),
- CallArgs.begin(), CallArgs.end(),
- "",II);
+ CallArgs, "", II);
NewCall->takeName(II);
NewCall->setCallingConv(II->getCallingConv());
NewCall->setAttributes(II->getAttributes());
@@ -257,8 +256,7 @@ void LowerInvoke::rewriteExpensiveInvoke(InvokeInst *II, unsigned InvokeNo,
// Insert a normal call instruction.
SmallVector<Value*,16> CallArgs(II->op_begin(), II->op_end() - 3);
CallInst *NewCall = CallInst::Create(II->getCalledValue(),
- CallArgs.begin(), CallArgs.end(), "",
- II);
+ CallArgs, "", II);
NewCall->takeName(II);
NewCall->setCallingConv(II->getCallingConv());
NewCall->setAttributes(II->getAttributes());
@@ -565,7 +563,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
Type::getInt8PtrTy(F.getContext()),
"tmp", UnwindBlock);
Idx[1] = ConstantInt::get(Type::getInt32Ty(F.getContext()), 1);
- CallInst::Create(LongJmpFn, &Idx[0], &Idx[2], "", UnwindBlock);
+ CallInst::Create(LongJmpFn, Idx, "", UnwindBlock);
new UnreachableInst(F.getContext(), UnwindBlock);
// Set up the term block ("throw without a catch").