summaryrefslogtreecommitdiffstats
path: root/llvm/docs/ProgrammersManual.html
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-03-24 16:13:31 +0000
committerChris Lattner <sabre@nondot.org>2011-03-24 16:13:31 +0000
commit669ce55a42d4ed2305df3f160c701ce8a2286fa2 (patch)
treeb7af861d60099ba389793161dbf167f2f5b30f12 /llvm/docs/ProgrammersManual.html
parent2edfe778ecf0097245d328a4d6edcd70ae7f6cbc (diff)
downloadbcm5719-llvm-669ce55a42d4ed2305df3f160c701ce8a2286fa2.tar.gz
bcm5719-llvm-669ce55a42d4ed2305df3f160c701ce8a2286fa2.zip
fix description, PR9542
llvm-svn: 128214
Diffstat (limited to 'llvm/docs/ProgrammersManual.html')
-rw-r--r--llvm/docs/ProgrammersManual.html11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/docs/ProgrammersManual.html b/llvm/docs/ProgrammersManual.html
index bc09ca957d0..95632bdf824 100644
--- a/llvm/docs/ProgrammersManual.html
+++ b/llvm/docs/ProgrammersManual.html
@@ -2219,11 +2219,8 @@ Instruction* newInst = new Instruction(..., pi);
<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 @@ I-&gt;eraseFromParent();
</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>
<!--_______________________________________________________________________-->
OpenPOWER on IntegriCloud