diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-26 18:26:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-26 18:26:14 +0000 |
commit | e8343a5fbb09afdf449000785f727481b8b02a7c (patch) | |
tree | fcdd41ca0afd4f285bcd95c0f1928489ff6325b2 /lib/AsmParser | |
parent | 28ab668c1043c6bfa6f228b1016a1f4d5b13390b (diff) | |
download | external_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.y | 2 |
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; } |