summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2009-09-02 14:22:03 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2009-09-02 14:22:03 +0000
commit2fcee70aeb4cbc804b8f5b8b422de0973e8e08ee (patch)
tree6b8ba2e5f9300318c421e5407e7e7d01bc4cfc68 /llvm/lib/AsmParser/LLParser.cpp
parentae866b0c669156f7f846ebc565ad3beaeb1d891c (diff)
downloadbcm5719-llvm-2fcee70aeb4cbc804b8f5b8b422de0973e8e08ee.tar.gz
bcm5719-llvm-2fcee70aeb4cbc804b8f5b8b422de0973e8e08ee.zip
plug memory leak in LLParser::PerFunctionState::SetInstName() by deleting a value after replacing it
llvm-svn: 80790
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 94243289103..3d2e3125aa1 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud