Skip to content
Snippets Groups Projects
Commit 6ee2c571 authored by Chris Lattner's avatar Chris Lattner
Browse files

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
parent 75e57002
No related branches found
No related tags found
No related merge requests found
...@@ -405,7 +405,7 @@ static BasicBlock *getBBVal(const ValID &ID, bool isDefinition = false) { ...@@ -405,7 +405,7 @@ static BasicBlock *getBBVal(const ValID &ID, bool isDefinition = false) {
CurFun.CurrentFunction->getBasicBlockList().remove(BB); CurFun.CurrentFunction->getBasicBlockList().remove(BB);
CurFun.CurrentFunction->getBasicBlockList().push_back(BB); CurFun.CurrentFunction->getBasicBlockList().push_back(BB);
} }
ID.destroy();
return BB; return BB;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment