mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Range insertion now returns an iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2414 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -158,12 +158,9 @@ void DecomposePass::decomposeArrayRef(BasicBlock::iterator &BBI) {
|
|||||||
// Now delete the old instruction...
|
// Now delete the old instruction...
|
||||||
delete MAI;
|
delete MAI;
|
||||||
|
|
||||||
// Convert our iterator into an index... that cannot get invalidated
|
|
||||||
unsigned ItOffs = BBI-BB->begin();
|
|
||||||
|
|
||||||
// Insert all of the new instructions...
|
// Insert all of the new instructions...
|
||||||
BB->getInstList().insert(BBI, NewInsts.begin(), NewInsts.end());
|
BBI = BB->getInstList().insert(BBI, NewInsts.begin(), NewInsts.end());
|
||||||
|
|
||||||
// Advance the iterator to the instruction following the one just inserted...
|
// Advance the iterator to the instruction following the one just inserted...
|
||||||
BBI = BB->begin() + ItOffs + NewInsts.size();
|
BBI += NewInsts.size();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user