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

Tanya Lattner tonic at nondot.org
Wed Jun 20 13:46:59 PDT 2007



Changes in directory llvm/docs:

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

Modify deleting global variable with an even easier way.


---
Diffs of the changes:  (+5 -8)

 ProgrammersManual.html |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)


Index: llvm/docs/ProgrammersManual.html
diff -u llvm/docs/ProgrammersManual.html:1.132 llvm/docs/ProgrammersManual.html:1.133
--- llvm/docs/ProgrammersManual.html:1.132	Wed Jun 20 13:33:15 2007
+++ llvm/docs/ProgrammersManual.html	Wed Jun 20 15:46:37 2007
@@ -1886,19 +1886,16 @@
 
 <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. 
+<p>Deleting a global variable from a module is just as easy as deleting an 
+Instruction. First, you must have a pointer to the global variable that you wish
+ to delete.  You use this pointer to erase it from its parent, the module.
  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);
+GV->eraseFromParent();
 </pre>
 </div>
 
@@ -3086,7 +3083,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/06/20 18:33:15 $
+  Last modified: $Date: 2007/06/20 20:46:37 $
 </address>
 
 </body>






More information about the llvm-commits mailing list