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

Fix a memory leak. We leaked the vector holding the entries in switch tables.

llvm-svn: 13023
parent bc4118f3
No related branches found
No related tags found
No related merge requests found
...@@ -1657,6 +1657,7 @@ BBTerminatorInst : RET ResolvedVal { // Return with a result... ...@@ -1657,6 +1657,7 @@ BBTerminatorInst : RET ResolvedVal { // Return with a result...
E = $8->end(); E = $8->end();
for (; I != E; ++I) for (; I != E; ++I)
S->addCase(I->first, I->second); S->addCase(I->first, I->second);
delete $8;
} }
| SWITCH IntType ValueRef ',' LABEL ValueRef '[' ']' { | SWITCH IntType ValueRef ',' LABEL ValueRef '[' ']' {
SwitchInst *S = new SwitchInst(getVal($2, $3), SwitchInst *S = new SwitchInst(getVal($2, $3),
......
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