summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/LowerInvoke.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-25 09:48:08 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-25 09:48:08 +0000
commita9203109f4ac95aa7e9624f2838e3d89623ec902 (patch)
tree49efd5cde506bb3127e6c0b4a4b8f504d5466dcf /lib/Transforms/Utils/LowerInvoke.cpp
parentb7fbcc9696e38ca26c7eb67077c04b51c846c9cb (diff)
downloadllvm-a9203109f4ac95aa7e9624f2838e3d89623ec902.tar.gz
llvm-a9203109f4ac95aa7e9624f2838e3d89623ec902.tar.bz2
llvm-a9203109f4ac95aa7e9624f2838e3d89623ec902.tar.xz
Convert GetElementPtrInst to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135904 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp
index 8b5891f329..eb3037fa92 100644
--- a/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/lib/Transforms/Utils/LowerInvoke.cpp
@@ -455,8 +455,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
Value *Idx[] = { Constant::getNullValue(Type::getInt32Ty(F.getContext())),
ConstantInt::get(Type::getInt32Ty(F.getContext()), 1) };
- OldJmpBufPtr = GetElementPtrInst::Create(JmpBuf, &Idx[0], &Idx[2],
- "OldBuf",
+ OldJmpBufPtr = GetElementPtrInst::Create(JmpBuf, Idx, "OldBuf",
EntryBB->getTerminator());
// Copy the JBListHead to the alloca.
@@ -502,8 +501,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
"setjmp.cont");
Idx[1] = ConstantInt::get(Type::getInt32Ty(F.getContext()), 0);
- Value *JmpBufPtr = GetElementPtrInst::Create(JmpBuf, &Idx[0], &Idx[2],
- "TheJmpBuf",
+ Value *JmpBufPtr = GetElementPtrInst::Create(JmpBuf, Idx, "TheJmpBuf",
EntryBB->getTerminator());
JmpBufPtr = new BitCastInst(JmpBufPtr,
Type::getInt8PtrTy(F.getContext()),
@@ -557,8 +555,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
// Get a pointer to the jmpbuf and longjmp.
Value *Idx[] = { Constant::getNullValue(Type::getInt32Ty(F.getContext())),
ConstantInt::get(Type::getInt32Ty(F.getContext()), 0) };
- Idx[0] = GetElementPtrInst::Create(BufPtr, &Idx[0], &Idx[2], "JmpBuf",
- UnwindBlock);
+ Idx[0] = GetElementPtrInst::Create(BufPtr, Idx, "JmpBuf", UnwindBlock);
Idx[0] = new BitCastInst(Idx[0],
Type::getInt8PtrTy(F.getContext()),
"tmp", UnwindBlock);