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
diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index 2934697..66818bc 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/lib/Transforms/Scalar/SCCP.cpp
@@ -314,6 +314,8 @@
   // 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;
 }