mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Don't corrupt memory when removing an instruction from the program, but
not the worklist git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6733 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a9f6e4ae0e
commit
bea68b3021
@ -120,6 +120,7 @@ bool GCSE::EliminateRedundancies(Instruction *I,
|
||||
|
||||
// Erase the instruction from the program.
|
||||
I->getParent()->getInstList().erase(I);
|
||||
WorkList.erase(I);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user