From e8343a5fbb09afdf449000785f727481b8b02a7c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 26 Oct 2004 18:26:14 +0000 Subject: [PATCH] Plug a memory leak in the asmparser. It turns out that we were leaking the strings for basic block labels in some cases. This amounted to about 120K of memory for namd, a medium sized program. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17262 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/llvmAsmParser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index f450c8f0c55..1f6b53909f0 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -405,7 +405,7 @@ static BasicBlock *getBBVal(const ValID &ID, bool isDefinition = false) { CurFun.CurrentFunction->getBasicBlockList().remove(BB); CurFun.CurrentFunction->getBasicBlockList().push_back(BB); } - + ID.destroy(); return BB; } -- 2.34.1