[llvm-commits] [llvm] r128214 - /llvm/trunk/docs/ProgrammersManual.html

Chris Lattner sabre at nondot.org
Thu Mar 24 09:13:31 PDT 2011


Author: lattner
Date: Thu Mar 24 11:13:31 2011
New Revision: 128214

URL: http://llvm.org/viewvc/llvm-project?rev=128214&view=rev
Log:
fix description, PR9542

Modified:
    llvm/trunk/docs/ProgrammersManual.html

Modified: llvm/trunk/docs/ProgrammersManual.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ProgrammersManual.html?rev=128214&r1=128213&r2=128214&view=diff
==============================================================================
--- llvm/trunk/docs/ProgrammersManual.html (original)
+++ llvm/trunk/docs/ProgrammersManual.html Thu Mar 24 11:13:31 2011
@@ -2219,11 +2219,8 @@
 <div class="doc_text">
 
 <p>Deleting an instruction from an existing sequence of instructions that form a
-<a href="#BasicBlock"><tt>BasicBlock</tt></a> is very straight-forward. First,
-you must have a pointer to the instruction that you wish to delete.  Second, you
-need to obtain the pointer to that instruction's basic block. You use the
-pointer to the basic block to get its list of instructions and then use the
-erase function to remove your instruction. For example:</p>
+<a href="#BasicBlock"><tt>BasicBlock</tt></a> is very straight-forward: just
+call the instruction's eraseFromParent() method.  For example:</p>
 
 <div class="doc_code">
 <pre>
@@ -2232,6 +2229,10 @@
 </pre>
 </div>
 
+<p>This unlinks the instruction from its containing basic block and deletes 
+it.  If you'd just like to unlink the instruction from its containing basic
+block but not delete it, you can use the <tt>removeFromParent()</tt> method.</p>
+
 </div>
 
 <!--_______________________________________________________________________-->





More information about the llvm-commits mailing list