mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
Don't corrupt memory when removing an instruction from the program, but
not the worklist llvm-svn: 6733
This commit is contained in:
parent
e231d9ad37
commit
2b01ee820e
@ -120,6 +120,7 @@ bool GCSE::EliminateRedundancies(Instruction *I,
|
|||||||
|
|
||||||
// Erase the instruction from the program.
|
// Erase the instruction from the program.
|
||||||
I->getParent()->getInstList().erase(I);
|
I->getParent()->getInstList().erase(I);
|
||||||
|
WorkList.erase(I);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user