Plug a memory leak in the asmparser. It turns out that we were leaking
authorChris Lattner <sabre@nondot.org>
Tue, 26 Oct 2004 18:26:14 +0000 (18:26 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 26 Oct 2004 18:26:14 +0000 (18:26 +0000)
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

index f450c8f0c55042d12cd0cbbf3831feffdc23d951..1f6b53909f06c45ed708fb50c56a7521600f2441 100644 (file)
@@ -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;
 }