mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-17 05:25:47 +00:00
Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41697 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -450,8 +450,8 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
|
||||
std::vector<Value*> Idx;
|
||||
Idx.push_back(Constant::getNullValue(Type::Int32Ty));
|
||||
Idx.push_back(ConstantInt::get(Type::Int32Ty, 1));
|
||||
OldJmpBufPtr = new GetElementPtrInst(JmpBuf, &Idx[0], 2, "OldBuf",
|
||||
EntryBB->getTerminator());
|
||||
OldJmpBufPtr = new GetElementPtrInst(JmpBuf, Idx.begin(), Idx.end(),
|
||||
"OldBuf", EntryBB->getTerminator());
|
||||
|
||||
// Copy the JBListHead to the alloca.
|
||||
Value *OldBuf = new LoadInst(JBListHead, "oldjmpbufptr", true,
|
||||
@@ -489,7 +489,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
|
||||
"setjmp.cont");
|
||||
|
||||
Idx[1] = ConstantInt::get(Type::Int32Ty, 0);
|
||||
Value *JmpBufPtr = new GetElementPtrInst(JmpBuf, &Idx[0], Idx.size(),
|
||||
Value *JmpBufPtr = new GetElementPtrInst(JmpBuf, Idx.begin(), Idx.end(),
|
||||
"TheJmpBuf",
|
||||
EntryBB->getTerminator());
|
||||
Value *SJRet = new CallInst(SetJmpFn, JmpBufPtr, "sjret",
|
||||
@@ -540,7 +540,8 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
|
||||
std::vector<Value*> Idx;
|
||||
Idx.push_back(Constant::getNullValue(Type::Int32Ty));
|
||||
Idx.push_back(ConstantInt::get(Type::Int32Ty, 0));
|
||||
Idx[0] = new GetElementPtrInst(BufPtr, &Idx[0], 2, "JmpBuf", UnwindBlock);
|
||||
Idx[0] = new GetElementPtrInst(BufPtr, Idx.begin(), Idx.end(), "JmpBuf",
|
||||
UnwindBlock);
|
||||
Idx[1] = ConstantInt::get(Type::Int32Ty, 1);
|
||||
new CallInst(LongJmpFn, Idx.begin(), Idx.end(), "", UnwindBlock);
|
||||
new UnreachableInst(UnwindBlock);
|
||||
|
Reference in New Issue
Block a user