Make sure to _delete_ memory allocated by worklists
llvm-svn: 4523
This commit is contained in:
1 parent
0ac3e3c039
commit
669c6cf459
1 file changed
+2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user