diff options
Diffstat (limited to 'lib/Module/LowerSwitch.cpp')
-rw-r--r-- | lib/Module/LowerSwitch.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Module/LowerSwitch.cpp b/lib/Module/LowerSwitch.cpp index a1b887f3..a2033eae 100644 --- a/lib/Module/LowerSwitch.cpp +++ b/lib/Module/LowerSwitch.cpp @@ -64,12 +64,8 @@ void LowerSwitchPass::switchConvert(CaseItr begin, CaseItr end, Function::iterator FI = origBlock; F->getBasicBlockList().insert(++FI, newBlock); - ICmpInst *cmpInst = new ICmpInst(ICmpInst::ICMP_EQ, - value, - it->value, - "Case Comparison"); - - newBlock->getInstList().push_back(cmpInst); + ICmpInst *cmpInst = + new ICmpInst(*newBlock, ICmpInst::ICMP_EQ, value, it->value, "case.cmp"); BranchInst::Create(it->block, curHead, cmpInst, newBlock); // If there were any PHI nodes in this successor, rewrite one entry |