Make sure to _delete_ memory allocated by worklists

llvm-svn: 4523
This commit is contained in:
Chris Lattner 2002-11-04 02:54:22 +00:00
parent 0ac3e3c039
commit 669c6cf459
1 changed files with 2 additions and 0 deletions

View File

@ -314,6 +314,8 @@ bool SCCP::runOnFunction(Function &F) {
// Reset state so that the next invocation will have empty data structures
BBExecutable.clear();
ValueState.clear();
std::vector<Instruction*>().swap(InstWorkList);
std::vector<BasicBlock*>().swap(BBWorkList);
return MadeChanges;
}