mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Convert GetElementPtrInst to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135904 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user