aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2007-06-20 20:46:37 +0000
committerTanya Lattner <tonic@nondot.org>2007-06-20 20:46:37 +0000
commitc5dfcdb3a57a0905eab4d10127e1fb2d99d3146b (patch)
tree0bd2bcfefa470a9b99abd6f8e8c4e7b36e96b707 /docs
parent2397f8d0c6548e4021546ff1a58104284d79cda7 (diff)
downloadexternal_llvm-c5dfcdb3a57a0905eab4d10127e1fb2d99d3146b.zip
external_llvm-c5dfcdb3a57a0905eab4d10127e1fb2d99d3146b.tar.gz
external_llvm-c5dfcdb3a57a0905eab4d10127e1fb2d99d3146b.tar.bz2
Modify deleting global variable with an even easier way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37676 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/ProgrammersManual.html11
1 files changed, 4 insertions, 7 deletions
diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html
index 571d4ba..1f02fe6 100644
--- a/docs/ProgrammersManual.html
+++ b/docs/ProgrammersManual.html
@@ -1886,19 +1886,16 @@ ReplaceInstWithValue, ReplaceInstWithInst -->
<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-&gt;getParent();
-M-&gt;getGlobaleList().erase(GV);
+GV-&gt;eraseFromParent();
</pre>
</div>