diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp index 2601d7a98be9..d030a7d44cd5 100644 --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -733,6 +733,8 @@ void WinEHPrepare::completeNestedLandingPad(Function *ParentFn, ActionTargets.push_back(NewBA); } } + DeleteContainerPointers(ActionList); + ActionList.clear(); OutlinedBB->getInstList().push_back(EHActions); // Insert an indirect branch into the outlined landing pad BB.