[llvm-commits] CVS: llvm/docs/ProgrammersManual.html

Tanya Lattner tonic at nondot.org
Wed Jun 20 11:33:33 PDT 2007



Changes in directory llvm/docs:

ProgrammersManual.html updated: 1.131 -> 1.132
---
Log message:

Add blurb on deleting global variables.


---
Diffs of the changes:  (+27 -1)

 ProgrammersManual.html |   28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletion(-)


Index: llvm/docs/ProgrammersManual.html
diff -u llvm/docs/ProgrammersManual.html:1.131 llvm/docs/ProgrammersManual.html:1.132
--- llvm/docs/ProgrammersManual.html:1.131	Fri Mar 30 07:22:09 2007
+++ llvm/docs/ProgrammersManual.html	Wed Jun 20 13:33:15 2007
@@ -106,6 +106,7 @@
           <li><a href="#schanges_deleting">Deleting 		 <tt>Instruction</tt>s</a> </li>
           <li><a href="#schanges_replacing">Replacing an 		 <tt>Instruction</tt>
 with another <tt>Value</tt></a> </li>
+          <li><a href="#schanges_deletingGV">Deleting <tt>GlobalVariable</tt>s</a> </li>  
         </ul>
       </li>
 <!--
@@ -1878,6 +1879,31 @@
 
 </div>
 
+<!--_______________________________________________________________________-->
+<div class="doc_subsubsection">
+  <a name="schanges_deletingGV">Deleting <tt>GlobalVariable</tt>s</a>
+</div>
+
+<div class="doc_text">
+
+<p>Deleting a global variable from a module is similar to deleting an 
+instruction. First, you must have a pointer to the global variable that you wish
+ to delete.  Second, you must have a pointer to the module the global variable 
+ belongs to. You use the pointer to the module to get its list of global 
+ variables and then use the erase function to remove your global variable. 
+ For example:</p>
+
+<div class="doc_code">
+<pre>
+<a href="#GlobalVariable">GlobalVariable</a> *GV = .. ;
+<a href="#Module">Module</a> *M = GV->getParent();
+
+M->getGlobaleList().erase(GV);
+</pre>
+</div>
+
+</div>
+
 <!-- *********************************************************************** -->
 <div class="doc_section">
   <a name="advanced">Advanced Topics</a>
@@ -3060,7 +3086,7 @@
   <a href="mailto:dhurjati at cs.uiuc.edu">Dinakar Dhurjati</a> and
   <a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
   <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2007/03/30 12:22:09 $
+  Last modified: $Date: 2007/06/20 18:33:15 $
 </address>
 
 </body>






More information about the llvm-commits mailing list