summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-29 21:25:34 +0000
committerChris Lattner <sabre@nondot.org>2002-04-29 21:25:34 +0000
commit27eeecbb69cc4c39d4ebb64e242927ae2a5f5f3c (patch)
tree2d66fbf3c41d585b6f8f6549034182c0ab4db57e /llvm/lib/Transforms
parentf3dee03ba94b9fc0344db8c9da131211799d9f8a (diff)
downloadbcm5719-llvm-27eeecbb69cc4c39d4ebb64e242927ae2a5f5f3c.tar.gz
bcm5719-llvm-27eeecbb69cc4c39d4ebb64e242927ae2a5f5f3c.zip
Range insertion now returns an iterator
llvm-svn: 2414
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp b/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp
index 396b503ebae..4637273a46d 100644
--- a/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp
+++ b/llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp
@@ -158,12 +158,9 @@ void DecomposePass::decomposeArrayRef(BasicBlock::iterator &BBI) {
// Now delete the old instruction...
delete MAI;
- // Convert our iterator into an index... that cannot get invalidated
- unsigned ItOffs = BBI-BB->begin();
-
// 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...
- BBI = BB->begin() + ItOffs + NewInsts.size();
+ BBI += NewInsts.size();
}
OpenPOWER on IntegriCloud