diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-17 18:09:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-17 18:09:47 +0000 |
commit | 233f97ac6a1f36c51e3dbb06b8f46441fa2c5fc5 (patch) | |
tree | 77f4ce239f6906000d002686c170db5bd54561d4 /llvm/lib/Transforms/Utils/LowerSwitch.cpp | |
parent | b0aebc208c1108b92dd8c8cdcd38dc055f4d14e3 (diff) | |
download | bcm5719-llvm-233f97ac6a1f36c51e3dbb06b8f46441fa2c5fc5.tar.gz bcm5719-llvm-233f97ac6a1f36c51e3dbb06b8f46441fa2c5fc5.zip |
remove use of BasicBlock::getNext
llvm-svn: 36205
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LowerSwitch.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp index 4a2dd9a9e07..61fa85c5eb6 100644 --- a/llvm/lib/Transforms/Utils/LowerSwitch.cpp +++ b/llvm/lib/Transforms/Utils/LowerSwitch.cpp @@ -155,7 +155,8 @@ BasicBlock* LowerSwitch::switchConvert(CaseItr Begin, CaseItr End, // left branch if it is and right branch if not. Function* F = OrigBlock->getParent(); BasicBlock* NewNode = new BasicBlock("NodeBlock"); - F->getBasicBlockList().insert(OrigBlock->getNext(), NewNode); + Function::iterator FI = OrigBlock; + F->getBasicBlockList().insert(++FI, NewNode); ICmpInst* Comp = new ICmpInst(ICmpInst::ICMP_SLT, Val, Pivot.Low, "Pivot"); NewNode->getInstList().push_back(Comp); @@ -175,7 +176,8 @@ BasicBlock* LowerSwitch::newLeafBlock(CaseRange& Leaf, Value* Val, { Function* F = OrigBlock->getParent(); BasicBlock* NewLeaf = new BasicBlock("LeafBlock"); - F->getBasicBlockList().insert(OrigBlock->getNext(), NewLeaf); + Function::iterator FI = OrigBlock; + F->getBasicBlockList().insert(++FI, NewLeaf); // Emit comparison ICmpInst* Comp = NULL; |