Fix a memory leak. We leaked the vector holding the entries in switch tables.
authorChris Lattner <sabre@nondot.org>
Sat, 17 Apr 2004 23:49:15 +0000 (23:49 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 17 Apr 2004 23:49:15 +0000 (23:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13023 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index 571fc4e1d7639f5cf3679b6a70e08c0483ba6ddc..c8304d75cc3f0a3c8cde9693964ed71ffe382c9f 100644 (file)
@@ -1657,6 +1657,7 @@ BBTerminatorInst : RET ResolvedVal {              // Return with a result...
       E = $8->end();
     for (; I != E; ++I)
       S->addCase(I->first, I->second);
+    delete $8;
   }
   | SWITCH IntType ValueRef ',' LABEL ValueRef '[' ']' {
     SwitchInst *S = new SwitchInst(getVal($2, $3),