[llvm] r241851 - [ImplicitNullChecks] Fix a memory leak.

Sanjoy Das sanjoy at playingwithpointers.com
Thu Jul 9 13:13:31 PDT 2015


Author: sanjoy
Date: Thu Jul  9 15:13:31 2015
New Revision: 241851

URL: http://llvm.org/viewvc/llvm-project?rev=241851&view=rev
Log:
[ImplicitNullChecks] Fix a memory leak.

Modified:
    llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp

Modified: llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp?rev=241851&r1=241850&r2=241851&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp (original)
+++ llvm/trunk/lib/CodeGen/ImplicitNullChecks.cpp Thu Jul  9 15:13:31 2015
@@ -320,7 +320,7 @@ void ImplicitNullChecks::rewriteNullChec
     // 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.





More information about the llvm-commits mailing list