diff options
author | Chris Lattner <sabre@nondot.org> | 2002-09-12 19:06:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-09-12 19:06:51 +0000 |
commit | 4e1f96b1ee6d859633a3de4341450ee4beed7e38 (patch) | |
tree | 30710b0a7c21dcca1d33eeadb1aa176d095e87c4 | |
parent | 1a7db9be567ffe50a551208433859a19da2a2ca9 (diff) | |
download | external_llvm-4e1f96b1ee6d859633a3de4341450ee4beed7e38.zip external_llvm-4e1f96b1ee6d859633a3de4341450ee4beed7e38.tar.gz external_llvm-4e1f96b1ee6d859633a3de4341450ee4beed7e38.tar.bz2 |
Incorporate information about deleting instructions from a basic block,
contributed by Tanya.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3692 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | docs/ProgrammersManual.html | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index c81f89c..4415a87 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -620,7 +620,7 @@ will create an <tt>AllocaInst</tt> instance that represents the allocation of one integer in the current stack frame, at runtime. Each <tt>Instruction</tt> subclass is likely to have varying default parameters which change the semantics of the instruction, so refer to -the <a href="/doxygen/classInstruction.h">doxygen documentation for +the <a href="/doxygen/classInstruction.html">doxygen documentation for the subclass of Instruction</a> that you're interested in instantiating.</p> @@ -701,7 +701,23 @@ instructions and adding them to <tt>BasicBlock</tt>s. <!--_______________________________________________________________________--> </ul><h4><a name="schanges_deleting"><hr size=0>Deleting - <tt>Instruction</tt>s</h4><ul> +<tt>Instruction</tt>s</h4><ul> + +Deleting an instruction from an existing sequence of instructions that form a <a +href="#BasicBlock"><tt>BasicBlock</tt></a> is very straightforward. 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.<p> + +For example:<p> + +<pre> + <a href="#Instruction">Instruction</a> *I = .. ; + <a href="#BasicBlock">BasicBlock</a> *BB = I->getParent(); + BB->getInstList().erase(I); +</pre><p> + <!--_______________________________________________________________________--> </ul><h4><a name="schanges_replacing"><hr size=0>Replacing an @@ -1559,6 +1575,6 @@ pointer to the parent Function. <a href="mailto:sabre@nondot.org">Chris Lattner</a></address> <!-- Created: Tue Aug 6 15:00:33 CDT 2002 --> <!-- hhmts start --> -Last modified: Thu Sep 12 12:18:04 CDT 2002 +Last modified: Thu Sep 12 14:06:40 CDT 2002 <!-- hhmts end --> </font></body></html> |