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 | 261cdfbe5e6e11d56ca1c49a75f26fece3b139c8 (patch) | |
tree | 4eae15d9e88812283beaa4373cd8a5dd76cd4c37 /lib/Transforms/Utils/LowerSwitch.cpp | |
parent | 97f89e688f335951afc75ac3eeefc347185f9d95 (diff) |
remove use of BasicBlock::getNext
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36205 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerSwitch.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index 4a2dd9a9e0..61fa85c5eb 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/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; |