From: Nuno Lopes Date: Wed, 2 Sep 2009 14:22:03 +0000 (+0000) Subject: plug memory leak in LLParser::PerFunctionState::SetInstName() by deleting a value... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=531552aaa24218c1b2043cf56d719f3d940aeed4;p=oota-llvm.git plug memory leak in LLParser::PerFunctionState::SetInstName() by deleting a value after replacing it git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80790 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 94243289103..3d2e3125aa1 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -1701,6 +1701,7 @@ bool LLParser::PerFunctionState::SetInstName(int NameID, return P.Error(NameLoc, "instruction forward referenced with type '" + FI->second.first->getType()->getDescription() + "'"); FI->second.first->replaceAllUsesWith(Inst); + delete FI->second.first; ForwardRefVals.erase(FI); }