diff options
author | Devang Patel <dpatel@apple.com> | 2007-08-07 17:45:35 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2007-08-07 17:45:35 +0000 |
commit | 8431a1cbcc06c039e1f3ffe9cf331cc3a8e260cf (patch) | |
tree | b30ff1c2e7490ea03108b72f0897a17a83b9e828 /lib/Transforms/Scalar/LoopIndexSplit.cpp | |
parent | 3baa3aac1b1dac583c7b4bd8bfa6a8362092f451 (diff) |
Use eraseFromParent().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopIndexSplit.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopIndexSplit.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp index a5dc4b09ab..a66526e4ef 100644 --- a/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -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); |