Make sure to _delete_ memory allocated by worklists

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-11-04 02:54:22 +00:00
parent 7e5f46a441
commit af663465d6

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