aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-26 18:26:14 +0000
committerChris Lattner <sabre@nondot.org>2004-10-26 18:26:14 +0000
commite8343a5fbb09afdf449000785f727481b8b02a7c (patch)
treefcdd41ca0afd4f285bcd95c0f1928489ff6325b2 /lib/AsmParser
parent28ab668c1043c6bfa6f228b1016a1f4d5b13390b (diff)
downloadexternal_llvm-e8343a5fbb09afdf449000785f727481b8b02a7c.zip
external_llvm-e8343a5fbb09afdf449000785f727481b8b02a7c.tar.gz
external_llvm-e8343a5fbb09afdf449000785f727481b8b02a7c.tar.bz2
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
Diffstat (limited to 'lib/AsmParser')
-rw-r--r--lib/AsmParser/llvmAsmParser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index f450c8f..1f6b539 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;
}