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:
Chris Lattner 2003-06-17 03:57:18 +00:00
parent a9f6e4ae0e
commit bea68b3021

View File

@ -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;