summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ImplicitNullChecks.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-07-09 20:13:31 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-07-09 20:13:31 +0000
commitc3a8e398a23c6c616580d3d358b29aca5dba5806 (patch)
tree5c845af7f07e25a61428fb56f0b73087d56e9e22 /llvm/lib/CodeGen/ImplicitNullChecks.cpp
parentb771845461f6ccb81e90b8e0d2a3443f9d4dbd2d (diff)
downloadbcm5719-llvm-c3a8e398a23c6c616580d3d358b29aca5dba5806.tar.gz
bcm5719-llvm-c3a8e398a23c6c616580d3d358b29aca5dba5806.zip
[ImplicitNullChecks] Fix a memory leak.
llvm-svn: 241851
Diffstat (limited to 'llvm/lib/CodeGen/ImplicitNullChecks.cpp')
-rw-r--r--llvm/lib/CodeGen/ImplicitNullChecks.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ImplicitNullChecks.cpp b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
index 5faeae4527a..93e04876a8f 100644
--- a/llvm/lib/CodeGen/ImplicitNullChecks.cpp
+++ b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
@@ -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.
OpenPOWER on IntegriCloud