From: Evgeniy Brevnov Date: Tue, 28 Jul 2020 12:50:40 +0000 (+0700) Subject: [BPI] Fix memory leak reported by sanitizer bots X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=412b3932c6612f4a60bfa8e0811cf6ba1bd3e0e8;p=platform%2Fupstream%2Fllvm.git [BPI] Fix memory leak reported by sanitizer bots There is a silly mistake where release() is used instead of reset() for free resources of unique pointer. Reviewed By: ebrevnov Differential Revision: https://reviews.llvm.org/D84747 --- diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp index 195fc69..7e34f3b 100644 --- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp +++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp @@ -1178,7 +1178,7 @@ void BranchProbabilityInfo::calculate(const Function &F, const LoopInfo &LI, PostDominatedByUnreachable.clear(); PostDominatedByColdCall.clear(); - SccI.release(); + SccI.reset(); if (PrintBranchProb && (PrintBranchProbFuncName.empty() ||