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