mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Use Instruction::eraseFromParent().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52606 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -79,7 +79,7 @@ bool ConstantPropagation::runOnFunction(Function &F) {
|
||||
|
||||
// Remove the dead instruction.
|
||||
WorkList.erase(I);
|
||||
I->getParent()->getInstList().erase(I);
|
||||
I->eraseFromParent();
|
||||
|
||||
// We made a change to the function...
|
||||
Changed = true;
|
||||
|
||||
@@ -201,5 +201,5 @@ void GCSE::ReplaceInstructionWith(Instruction *I, Value *V) {
|
||||
}
|
||||
|
||||
// Erase the instruction from the program.
|
||||
I->getParent()->getInstList().erase(I);
|
||||
I->eraseFromParent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user