summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commit6ee2c5712886bc626604d522f9dd2ba534134690 (patch)
tree8cc6eb3daeec82e792f4bbbb6e18ebf7b582da01 /llvm/lib
parent75e570022725b2b4c0c3c8dfabfe58c4e445ac30 (diff)
downloadbcm5719-llvm-6ee2c5712886bc626604d522f9dd2ba534134690.tar.gz
bcm5719-llvm-6ee2c5712886bc626604d522f9dd2ba534134690.zip
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. llvm-svn: 17262
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/AsmParser/llvmAsmParser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/llvmAsmParser.y b/llvm/lib/AsmParser/llvmAsmParser.y
index f450c8f0c55..1f6b53909f0 100644
--- a/llvm/lib/AsmParser/llvmAsmParser.y
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud