[ImplicitNullChecks] Fix a memory leak.

llvm-svn: 241851
This commit is contained in:
Sanjoy Das 2015-07-09 20:13:31 +00:00
parent b771845461
commit c3a8e398a2
1 changed files with 1 additions and 1 deletions

View File

@ -320,7 +320,7 @@ void ImplicitNullChecks::rewriteNullChecks(
// touch the successors list for any basic block since we haven't changed
// control flow, we've just made it implicit.
insertFaultingLoad(NC.MemOperation, NC.CheckBlock, HandlerLabel);
NC.MemOperation->removeFromParent();
NC.MemOperation->eraseFromParent();
NC.CheckOperation->eraseFromParent();
// Insert an *unconditional* branch to not-null successor.