mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
fix description, PR9542
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2219,11 +2219,8 @@ Instruction* newInst = new Instruction(..., pi);
|
|||||||
<div class="doc_text">
|
<div class="doc_text">
|
||||||
|
|
||||||
<p>Deleting an instruction from an existing sequence of instructions that form a
|
<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,
|
<a href="#BasicBlock"><tt>BasicBlock</tt></a> is very straight-forward: just
|
||||||
you must have a pointer to the instruction that you wish to delete. Second, you
|
call the instruction's eraseFromParent() method. For example:</p>
|
||||||
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>
|
|
||||||
|
|
||||||
<div class="doc_code">
|
<div class="doc_code">
|
||||||
<pre>
|
<pre>
|
||||||
@@ -2232,6 +2229,10 @@ I->eraseFromParent();
|
|||||||
</pre>
|
</pre>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
|
||||||
<!--_______________________________________________________________________-->
|
<!--_______________________________________________________________________-->
|
||||||
|
Reference in New Issue
Block a user