From af663465d64c40e6798c0dacb9d49e9cef763a17 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 4 Nov 2002 02:54:22 +0000 Subject: [PATCH] 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 --- lib/Transforms/Scalar/SCCP.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp index 293469758ad..66818bc3b63 100644 --- a/lib/Transforms/Scalar/SCCP.cpp +++ b/lib/Transforms/Scalar/SCCP.cpp @@ -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().swap(InstWorkList); + std::vector().swap(BBWorkList); return MadeChanges; } -- 2.34.1