mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
Use eraseFromParent().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40903 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3baa3aac1b
commit
8431a1cbcc
@ -238,8 +238,7 @@ bool LoopIndexSplit::processOneIterationLoop(LPPassManager &LPM) {
|
||||
Instruction *NSplitCond = BinaryOperator::create(Instruction::And,
|
||||
C1, C2, "lisplit", Terminator);
|
||||
SplitCondition->replaceAllUsesWith(NSplitCond);
|
||||
SplitCondition->removeFromParent();
|
||||
delete SplitCondition;
|
||||
SplitCondition->eraseFromParent();
|
||||
|
||||
// As a first step to break this loop, remove Latch to Header edge.
|
||||
BasicBlock *LatchSucc = NULL;
|
||||
@ -263,8 +262,7 @@ bool LoopIndexSplit::processOneIterationLoop(LPPassManager &LPM) {
|
||||
continue;
|
||||
|
||||
I->replaceAllUsesWith(UndefValue::get(I->getType()));
|
||||
I->removeFromParent();
|
||||
delete I;
|
||||
I->eraseFromParent();
|
||||
}
|
||||
|
||||
LPM.deleteLoopFromQueue(L);
|
||||
|
Loading…
Reference in New Issue
Block a user