diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index 293469758ad1..66818bc3b63b 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/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; }