From bb52a7179e0eb8e8081dd6aead67fab3d540ec6d Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Fri, 23 Dec 2016 15:02:35 +0000 Subject: [PATCH] [LICM] Plug a leak freeing the ASTs before clearing the map. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290433 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LICM.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index bc2a9d1391b..c981a8ff96b 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -128,6 +128,8 @@ struct LegacyLICMPass : public LoopPass { // If we have run LICM on a previous loop but now we are skipping // (because we've hit the opt-bisect limit), we need to clear the // loop alias information. + for (auto <AS : LICM.getLoopToAliasSetMap()) + delete LTAS.second; LICM.getLoopToAliasSetMap().clear(); return false; } -- 2.50.1